Class PathLengthOptimizerPtr


  • public class PathLengthOptimizerPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • PathLengthOptimizerPtr

        public PathLengthOptimizerPtr​(long cPtr,
                                      boolean cMemoryOwn)
      • PathLengthOptimizerPtr

        public PathLengthOptimizerPtr()
        Default constructor yielding a NULL-pointer.
      • PathLengthOptimizerPtr

        public PathLengthOptimizerPtr​(PathLengthOptimizer ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • shortCut

        public SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t shortCut​(SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t path,
                                                                       long cnt,
                                                                       double time,
                                                                       double subDivideLength)
        Optimizes using the shortcut technique

        The shortCut algorithm works by selecting two random indices i and j and
        try to connect those.

        The algorithm will loop until either the specified cnt is of met or the specified
        time is reached.

        Parameters:
        path - [inout] Path to optimize
        cnt - [in] Max count to use. If cnt=0, only the time limit will be used
        time - [in] Max time to use (in seconds). If time=0, only the cnt limit will be used
        subDivideLength - [in] The length into which the path is subdivided
      • partialShortCut

        public SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t partialShortCut​(SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t path,
                                                                              long cnt,
                                                                              double time,
                                                                              double subDivideLength)
        Optimizes using the partial shortcut technique

        The partialShortCut algorithm select two random node indices i and j and a random
        position in the configuration vector. A shortcut is then only tried between the values
        corresponding to the random position.

        The algorithm will loop until either the specified cnt is of met or the specified
        time is reached.

        Parameters:
        path - [inout] Path to optimize
        cnt - [in] Max count to use. If cnt=0, only the time limit will be used
        time - [in] Max time to use (in seconds). If time=0, only the cnt limit will be used
        subDivideLength - [in] The length into which the path is subdivided
      • getPropertyMap

        public PropertyMap getPropertyMap()
        Returns the propertymap
        Returns:
        Reference to the property map
      • getPROP_LOOPCOUNT

        public java.lang.String getPROP_LOOPCOUNT()
        Property key for the maximal number of loops
      • getPROP_MAXTIME

        public java.lang.String getPROP_MAXTIME()
        Property key for max time
      • getPROP_SUBDIVLENGTH

        public java.lang.String getPROP_SUBDIVLENGTH()
        Property key for length of segment in when subdividing