|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.util.Maps
public class Maps
This class provides convenience and transformation services for NodeMap
s, EdgeMap
s
and DataMap
s.
Nested Class Summary | |
---|---|
static class |
Maps.HighPerformanceBoolMap
Implementation of a resettable high performance map for values of simple type boolean . |
static class |
Maps.HighPerformanceDoubleMap
Implementation of a resettable high performance map for values of simple type double . |
static class |
Maps.HighPerformanceIntMap
Implementation of a resettable high performance map for values of simple type int . |
static class |
Maps.HighPerformanceObjectMap
Implementation of a resettable high performance map for values of type Object . |
Constructor Summary | |
---|---|
Maps()
|
Method Summary | |
---|---|
static DataMap |
createDataMap(java.util.Map map)
Create a DataMap view of the given map. |
static EdgeMap |
createEdgeMap(java.util.Map map)
Create an EdgeMap view of the given map. |
static DataMap |
createHashedDataMap()
Creates a DataMap that is based on hashing. |
static EdgeMap |
createHashedEdgeMap()
Creates an EdgeMap that is based on hashing. |
static NodeMap |
createHashedNodeMap()
Creates a NodeMap that is based on hashing. |
static EdgeMap |
createIndexEdgeMap(boolean[] data)
Returns a EdgeMap view of a boolean array defined for edges. |
static EdgeMap |
createIndexEdgeMap(double[] data)
Returns a EdgeMap view of a double array defined for edges. |
static EdgeMap |
createIndexEdgeMap(double[] doubleData,
int[] intData,
boolean[] boolData,
java.lang.Object[] objectData)
Returns a EdgeMap view of a double, int, boolean and Object
array defined for edges. |
static EdgeMap |
createIndexEdgeMap(int[] data)
Returns a EdgeMap view of an int array defined for edges. |
static EdgeMap |
createIndexEdgeMap(java.lang.Object[] data)
Returns a EdgeMap view of an Object array defined for edges. |
static NodeMap |
createIndexNodeMap(boolean[] data)
Returns a NodeMap view of a boolean array defined for nodes. |
static NodeMap |
createIndexNodeMap(double[] data)
Returns a NodeMap view of a double array defined for nodes. |
static NodeMap |
createIndexNodeMap(double[] doubleData,
int[] intData,
boolean[] boolData,
java.lang.Object[] objectData)
Returns a NodeMap view of a double, int, boolean and Object
array defined for nodes. |
static NodeMap |
createIndexNodeMap(int[] data)
Returns a NodeMap view of an int array defined for nodes. |
static NodeMap |
createIndexNodeMap(java.lang.Object[] data)
Returns a NodeMap view of an Object array defined for nodes. |
static NodeMap |
createNodeMap(java.util.Map map)
Create a NodeMap view of the given map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Maps()
Method Detail |
---|
public static NodeMap createIndexNodeMap(double[] data)
NodeMap
view of a double array defined for nodes.
The double value data[node.index()]
will be accessed
by the NodeMap
upon the method calls getDouble(node)
and setDouble(node,value)
.
Warning! The indices of the accessed nodes must not change during
the use of this map.
data
- array data for each node of a static graph
NodeMap
view of the given arraypublic static NodeMap createIndexNodeMap(int[] data)
NodeMap
view of an int array defined for nodes.
The int value data[node.index()]
will be accessed
by the NodeMap
upon the method calls getInt(node)
and setInt(node,value)
.
Warning! The indices of the accessed nodes must not change during
the use of this map.
data
- array data for each node of a static graph
NodeMap
view of the given arraypublic static NodeMap createIndexNodeMap(boolean[] data)
NodeMap
view of a boolean array defined for nodes.
The boolean value data[node.index()]
will be accessed
by the NodeMap
upon the method calls getBool(node)
and setBool(node,value)
.
data
- array data for each node of a static graph
NodeMap
view of the given arraypublic static NodeMap createIndexNodeMap(java.lang.Object[] data)
NodeMap
view of an Object
array defined for nodes.
The Object
value data[node.index()]
will be accessed
by the NodeMap upon the method calls get(node)
and set(node,value)
.
Warning! The indices of the accessed nodes must not change during
the use of this map.
data
- array data for each node of a static graph
NodeMap
view of the given arraypublic static NodeMap createIndexNodeMap(double[] doubleData, int[] intData, boolean[] boolData, java.lang.Object[] objectData)
NodeMap
view of a double, int, boolean and Object
array defined for nodes.
The double value doubleData[node.index()]
will be accessed
by the NodeMap
upon the method calls getDouble(node)
and
setDouble(node,value)
.
The int value intData[node.index()]
will be accessed
by the NodeMap
upon the method calls getInt(node)
and
setInt(node,value)
.
The boolean value boolData[node.index()]
will be accessed
by the NodeMap
upon the method calls getBool(node)
and
setBool(node,value)
.
The Object
value objectData[node.index()]
will be accessed
by the NodeMap
upon the method calls get(node)
and
set(node,value)
.
Warning! The indices of the accessed nodes must not change during
the use of this map.
doubleData
- double data for each node of a static graphintData
- int data for each node of a static graphboolData
- boolean data for each node of a static graphobjectData
- Object
data for each node of a static graph
NodeMap
view of the given arrayspublic static EdgeMap createIndexEdgeMap(double[] data)
EdgeMap
view of a double array defined for edges.
The double value data[edge.index()]
will be accessed
by the EdgeMap
upon the method calls getDouble(edge)
and setDouble(edge,value)
.
Warning! The indices of the accessed edges must not change during
the use of this map.
data
- array data for each edge of a static graph
EdgeMap
view of the given arraypublic static EdgeMap createIndexEdgeMap(int[] data)
EdgeMap
view of an int array defined for edges.
The int value data[edge.index()]
will be accessed
by the EdgeMap
upon the method calls getInt(edge)
and setInt(edge,value)
.
Warning! The indices of the accessed edges must not change during
the use of this map.
data
- array data for each edge of a static graph
EdgeMap
view of the given arraypublic static EdgeMap createIndexEdgeMap(boolean[] data)
EdgeMap
view of a boolean array defined for edges.
The boolean value data[edge.index()]
will be accessed
by the EdgeMap
upon the method calls getBool(edge)
and setBool(edge,value)
.
Warning! The indices of the accessed edges must not change during
the use of this map.
data
- array data for each edge of a static graph
EdgeMap
view of the given arraypublic static EdgeMap createIndexEdgeMap(java.lang.Object[] data)
EdgeMap
view of an Object
array defined for edges.
The Object
value data[edge.index()]
will be accessed
by the EdgeMap
upon the method calls get(edge)
and set(edge,value)
.
Warning! The indices of the accessed edges must not change during
the use of this map.
data
- array data for each edge of a static graph
EdgeMap
view of the given arraypublic static EdgeMap createIndexEdgeMap(double[] doubleData, int[] intData, boolean[] boolData, java.lang.Object[] objectData)
EdgeMap
view of a double, int, boolean and Object
array defined for edges.
The double value doubleData[edge.index()]
will be accessed
by the EdgeMap
upon the method calls getDouble(edge)
and
setDouble(edge,value)
.
The int value intData[edge.index()]
will be accessed
by the EdgeMap
upon the method calls getInt(edge)
and
setInt(edge,value)
.
The boolean value boolData[edge.index()]
will be accessed
by the EdgeMap
upon the method calls getBool(edge)
and
setBool(edge,value)
.
The Object
value objectData[edge.index()]
will be accessed
by the EdgeMap
upon the method calls get(edge)
and
set(edge,value)
.
Warning! The indices of the accessed edges must not change during
the use of this map.
doubleData
- double data for each edge of a static graphintData
- int data for each edge of a static graphboolData
- boolean data for each edge of a static graphobjectData
- Object
data for each edge of a static graph
EdgeMap
view of the given arrayspublic static NodeMap createHashedNodeMap()
NodeMap
that is based on hashing.
The preconditions specified in java.util.HashMap
apply for the keys and values of this map.
public static NodeMap createNodeMap(java.util.Map map)
NodeMap
view of the given map.
Accessing basic value types is solved by
storing the corresponding wrapper types
Double, Integer and Boolean within the given map.
public static EdgeMap createHashedEdgeMap()
EdgeMap
that is based on hashing.
The preconditions specified in java.util.HashMap
apply for the keys and values of this map.
public static EdgeMap createEdgeMap(java.util.Map map)
EdgeMap
view of the given map.
Accessing basic value types is solved by
storing the corresponding wrapper types
Double, Integer and Boolean within the given map.
public static DataMap createHashedDataMap()
DataMap
that is based on hashing.
The preconditions specified in java.util.HashMap
apply for the keys and values of this map.
public static DataMap createDataMap(java.util.Map map)
DataMap
view of the given map.
Accessing basic value types is solved by
storing the corresponding wrapper types
Double, Integer and Boolean within the given map.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |