Class PathLengthOptimizerPtr
- java.lang.Object
-
- org.robwork.sdurw_pathoptimization.PathLengthOptimizerPtr
-
public class PathLengthOptimizerPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description PathLengthOptimizerPtr()
Default constructor yielding a NULL-pointer.PathLengthOptimizerPtr(long cPtr, boolean cMemoryOwn)
PathLengthOptimizerPtr(PathLengthOptimizer ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PathLengthOptimizer
__ref__()
Dereferencing operator.PathLengthOptimizerCPtr
cptr()
void
delete()
PathLengthOptimizer
deref()
The pointer stored in the object.boolean
equals(PathLengthOptimizer p)
static long
getCPtr(PathLengthOptimizerPtr obj)
PathLengthOptimizer
getDeref()
Member access operator.java.lang.String
getPROP_LOOPCOUNT()
Property key for the maximal number of loopsjava.lang.String
getPROP_MAXTIME()
Property key for max timejava.lang.String
getPROP_SUBDIVLENGTH()
Property key for length of segment in when subdividingPropertyMap
getPropertyMap()
Returns the propertymapboolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipSWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t
partialShortCut(SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t path)
Optimizes using the partial shortcut technique
Works similar to partialShortCut(const rw::pathplanning::Path&,
size_t, double, double) except that parameters are read from the
propertymap.
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.SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t
pathPruning(SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t path)
Optimizes using path pruning.
pathPruning runs through the path an tests if nodes with
index i and i+2 can be directly connected.SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t
shortCut(SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t path)
Optimizes using the shortcut technique
Works similar to shortCut(const rw::pathplanning::Path&, size_t,
double, double) except that parameters are read from the propertymap.
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.
-
-
-
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
-
getCPtr
public static long getCPtr(PathLengthOptimizerPtr obj)
-
delete
public void delete()
-
deref
public PathLengthOptimizer deref()
The pointer stored in the object.
-
__ref__
public PathLengthOptimizer __ref__()
Dereferencing operator.
-
getDeref
public PathLengthOptimizer getDeref()
Member access operator.
-
equals
public boolean equals(PathLengthOptimizer p)
-
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
-
cptr
public PathLengthOptimizerCPtr cptr()
-
pathPruning
public SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t pathPruning(SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t path)
Optimizes using path pruning.
pathPruning runs through the path an tests if nodes with
index i and i+2 can be directly connected. If so it removes node i+1.
- Parameters:
path
- [in] Path to optimize
-
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 optimizecnt
- [in] Max count to use. If cnt=0, only the time limit will be usedtime
- [in] Max time to use (in seconds). If time=0, only the cnt limit will be usedsubDivideLength
- [in] The length into which the path is subdivided
-
shortCut
public SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t shortCut(SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t path)
Optimizes using the shortcut technique
Works similar to shortCut(const rw::pathplanning::Path&, size_t,
double, double) except that parameters are read from the propertymap.
- Parameters:
path
- [inout] Path to optimize
-
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 optimizecnt
- [in] Max count to use. If cnt=0, only the time limit will be usedtime
- [in] Max time to use (in seconds). If time=0, only the cnt limit will be usedsubDivideLength
- [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)
Optimizes using the partial shortcut technique
Works similar to partialShortCut(const rw::pathplanning::Path&,
size_t, double, double) except that parameters are read from the
propertymap.
- Parameters:
path
- [inout] Path to optimize- Returns:
- The optimized path
-
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
-
-