This class provides convenience and transformation services for INodeMap and IEdgeMap, and other layout-related collection types.
Type Details
- yfiles module
- algorithms
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.algorithms.Maps
See Also
Static Methods
Create a IDataMap view of the given map.
Remarks
Create an IEdgeMap view of the given map.
Remarks
See Also
Creates a IDataMap that is based on hashing.
Remarks
See Also
Factory method that creates a IMap<TKey,TValue> that is a special hash map implementation mainly used by the layout algorithms.
Type Parameters
- K
- V
Parameters
A map of options to pass to the method.
- entries - ICollection<MapEntry<K,V>>
- The items to optionally populate the set with initially.
Returns
- ↪IMap<K,V>
- A new instance.
Factory method that creates an ICollection<T> implementation with set semantics that is a special hash map based implementation mainly used by the layout algorithms.
Type Parameters
- T
Parameters
A map of options to pass to the method.
- items - IEnumerable<T>
- The items to optionally populate the set with initially.
Returns
- ↪ICollection<T>
- A new instance.
createHighPerformanceDoubleMap
(backingProvider: IDataProvider, backingAcceptor: IDataAcceptor, defaultValue: number) : INodeMapCreates a resettable high performance map for values of type double
.
Remarks
createHighPerformanceIntMap
(backingProvider: IDataProvider, backingAcceptor: IDataAcceptor, defaultValue: number) : INodeMapCreates a resettable high performance map for values of type int
.
Remarks
createHighPerformanceMap
(backingProvider: IDataProvider, backingAcceptor: IDataAcceptor, defaultValue: Object) : INodeMapCreates a resettable high performance map for values of type Object
.
Remarks
Returns a IEdgeMap view of an Object array defined for edges.
Remarks
The Object value data[edge.index()]
will be accessed by the IEdgeMap 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.
Parameters
A map of options to pass to the method.
- data - Object[]
- array data for each edge of a static graph
Returns
Returns a IEdgeMap view of a boolean array defined for edges.
Remarks
The boolean value data[edge.index()]
will be accessed by the IEdgeMap 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.
Parameters
A map of options to pass to the method.
- data - boolean[]
- array data for each edge of a static graph
Returns
See Also
Returns a IEdgeMap view of an int array defined for edges.
Remarks
The int value data[edge.index()]
will be accessed by the IEdgeMap 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.
Parameters
A map of options to pass to the method.
- data - number[]
- array data for each edge of a static graph
Returns
Returns a IEdgeMap view of a double array defined for edges.
Remarks
The double value data[edge.index()]
will be accessed by the IEdgeMap 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.
Parameters
A map of options to pass to the method.
- data - number[]
- array data for each edge of a static graph
Returns
createIndexEdgeMapFromArrays
(doubleData: number[], intData: number[], boolData: boolean[], objectData: Object[]) : IEdgeMapReturns a IEdgeMap view of a double, int, boolean and Object array defined for edges.
Remarks
The double value doubleData[edge.index()]
will be accessed by the IEdgeMap upon the method calls getDouble(edge)
and setDouble(edge,value)
.
The int value intData[edge.index()]
will be accessed by the IEdgeMap upon the method calls getInt(edge)
and setInt(edge,value)
.
The boolean value boolData[edge.index()]
will be accessed by the IEdgeMap upon the method calls getBool(edge)
and setBool(edge,value)
.
The Object value objectData[edge.index()]
will be accessed by the IEdgeMap 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.
Parameters
A map of options to pass to the method.
- doubleData - number[]
- double data for each edge of a static graph
- intData - number[]
- int data for each edge of a static graph
- boolData - boolean[]
- boolean data for each edge of a static graph
- objectData - Object[]
- Object data for each edge of a static graph
Returns
Returns a INodeMap view of an Object array defined for nodes.
Remarks
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.Parameters
A map of options to pass to the method.
- data - Object[]
- array data for each node of a static graph
Returns
Returns a INodeMap view of a boolean array defined for nodes.
Remarks
data[node.index()]
will be accessed by the INodeMap upon the method calls getBool(node)
and setBool(node,value)
.Parameters
A map of options to pass to the method.
- data - boolean[]
- array data for each node of a static graph
Returns
See Also
Returns a INodeMap view of an int array defined for nodes.
Remarks
data[node.index()]
will be accessed by the INodeMap 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.Parameters
A map of options to pass to the method.
- data - number[]
- array data for each node of a static graph
Returns
Returns a INodeMap view of a double array defined for nodes.
Remarks
The double value data[node.index()]
will be accessed by the INodeMap 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.
Parameters
A map of options to pass to the method.
- data - number[]
- array data for each node of a static graph
Returns
createIndexNodeMapFromArrays
(doubleData: number[], intData: number[], boolData: boolean[], objectData: Object[]) : INodeMapReturns a INodeMap view of a double, int, boolean and Object array defined for nodes.
Remarks
The double value doubleData[node.index()]
will be accessed by the INodeMap upon the method calls getDouble(node)
and setDouble(node,value)
.
The int value intData[node.index()]
will be accessed by the INodeMap upon the method calls getInt(node)
and setInt(node,value)
.
The boolean value boolData[node.index()]
will be accessed by the INodeMap upon the method calls getBool(node)
and setBool(node,value)
.
The Object value objectData[node.index()]
will be accessed by the INodeMap 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.
Parameters
A map of options to pass to the method.
- doubleData - number[]
- double data for each node of a static graph
- intData - number[]
- int data for each node of a static graph
- boolData - boolean[]
- boolean data for each node of a static graph
- objectData - Object[]
- Object data for each node of a static graph
Returns
Create a INodeMap view of the given map.