Package org.robwork.sdurw_kinematics
Class FrameMap
- java.lang.Object
-
- org.robwork.sdurw_kinematics.FrameMap
-
public class FrameMap extends java.lang.Object
a specialized mapping implementation for frames. It uses the internal
structure of Frames to provide fast O(1) lookup for mappings from Frame to anything.
Note: A requirement is that all frames must be registered in the same StateStructure.
-
-
Constructor Summary
Constructors Constructor Description FrameMap()
creates a framemapFrameMap(double defaultVal)
creates a framemap with an initial size of s
FrameMap(double defaultVal, int s)
creates a framemap with an initial size of sFrameMap(int s)
creates a framemapFrameMap(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the frame map.void
delete()
void
erase(Frame frame)
Erase an element from the mapdouble
get(Frame i)
static long
getCPtr(FrameMap obj)
boolean
has(Frame frame)
True iff a value for frame has been inserted in the map (or
accessed using non-const operator[]).void
insert(Frame frame, double value)
inserts a value into the frame mapvoid
set(Frame i, double d)
-
-
-
Constructor Detail
-
FrameMap
public FrameMap(long cPtr, boolean cMemoryOwn)
-
FrameMap
public FrameMap(int s)
creates a framemap- Parameters:
s
- [in] the default value of new instances of T
-
FrameMap
public FrameMap()
creates a framemap
-
FrameMap
public FrameMap(double defaultVal, int s)
creates a framemap with an initial size of s- Parameters:
s
- [in] nr of elements of the types T with default value "defaultVal"defaultVal
- [in] the default value of new instances of T
-
FrameMap
public FrameMap(double defaultVal)
creates a framemap with an initial size of s
- Parameters:
defaultVal
- [in] the default value of new instances of T
-
-
Method Detail
-
getCPtr
public static long getCPtr(FrameMap obj)
-
delete
public void delete()
-
insert
public void insert(Frame frame, double value)
inserts a value into the frame map- Parameters:
frame
- [in] the frame for which the value is to be associatedvalue
- [in] the value that is to be associated to the frame
-
has
public boolean has(Frame frame)
True iff a value for frame has been inserted in the map (or
accessed using non-const operator[]).
-
get
public double get(Frame i)
-
set
public void set(Frame i, double d)
-
erase
public void erase(Frame frame)
Erase an element from the map
-
clear
public void clear()
Clear the frame map.
-
-