|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.dillenco.simplegraph01.SimpleMap
edu.uci.ics.dillenco.simplegraph01.HalfEdgeMap<V>
public final class HalfEdgeMap<V>
This class maps HalfEdges of a given graph to user-defined attributes.
it provides a scaled-down version
of mapping: only put
, get
, clear
,
and isEmpty
are supported.
Field Summary |
---|
Fields inherited from class edu.uci.ics.dillenco.simplegraph01.SimpleMap |
---|
graph |
Constructor Summary | |
---|---|
HalfEdgeMap(Graph g)
Create an empty HalfEdgeMap for the given graph. |
Method Summary | |
---|---|
void |
clear()
Remove all stored values in this map |
V |
get(HalfEdge halfEdge)
Retrieve the value associated with the given HalfEdge. |
V |
get(QEdge qEdge,
int rot)
Retrieve the value associated with the given HalfEdge, where the HalfEdge is specified by a <QEdge,rot> pair. |
boolean |
isEmpty()
Return whether this map is currently empty. |
V |
put(HalfEdge halfEdge,
V value)
Store a <HalfEdge,V> pair. |
V |
put(QEdge qEdge,
int rot,
V value)
Store a <HalfEdge,V> pair, where the HalfEdge is specified
by a |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HalfEdgeMap(Graph g)
g
- the graph with which this map is to be associated.Method Detail |
---|
public V put(HalfEdge halfEdge, V value)
<HalfEdge,V> pair.
- Parameters:
halfEdge
- the HalfEdgevalue
- the associated value
- Returns:
- the previous value associated with the HalfEdge,
or null if there was no previous mapping for the HalfEdge.
public V put(QEdge qEdge, int rot, V value)
<HalfEdge,V> pair, where the HalfEdge is specified
by a <QEdge,rot> pair.
- Parameters:
qEdge
- the QEdge for the HalfEdgerot
- the rotation coefficient for the HalfEdgevalue
- the associated value
- Returns:
- the previous value associated with the HalfEdge,
or null if there was no previous mapping for the HalfEdge.
public V get(HalfEdge halfEdge)
halfEdge
- the HalfEdge
public V get(QEdge qEdge, int rot)
<QEdge,rot> pair.
- Parameters:
qEdge
- the QEdge for the HalfEdgerot
- the rotation coefficient for the HalfEdge
- Returns:
- the associated value.
public void clear()
clear
in class SimpleMap
public boolean isEmpty()
SimpleMap
isEmpty
in class SimpleMap
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |