Top Inners Fields Constructors Methods
org.jruby.dirgra

public Class Vertex<T extends ExplicitVertexID, U>

extends Object
implements Comparable<Vertex<T extends ExplicitVertexID, U>>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
java.util.ArrayList, .Arrays, .Collection, .Collections, .Comparator, .Iterator, .List

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
private T
private static final Edge<T extends ExplicitVertexID, U>[]
private DirectedGraph<T extends ExplicitVertexID, U>
pack-priv int
private Edge<T, U>[]
private int
private Edge<T, U>[]
private int

Constructor Summary

AccessConstructor and Description
public
Vertex(DirectedGraph<T extends ExplicitVertexID, U> graph, T data, int id)

Method Summary

Modifier and TypeMethod and Description
public void
addEdgeTo(Vertex<T extends ExplicitVertexID, U> destination)

public void
addEdgeTo(Vertex<T extends ExplicitVertexID, U> destination, U type)

public void
addEdgeTo(T destination)

public void
addEdgeTo(T destination, U type)

protected void
addIncomingEdge(Edge<T, U> newEdge)

protected void
addOutgoingEdge(Edge<T, U> newEdge)

public int
compareTo(Vertex<T, U>
the object to be compared.
that
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
public T
private Edge<T, U>
getFirstEdge(Iterator<Edge<T, U>> iterator)

public int
public Edge<T, U>
public Edge<T, U>
public Collection<Edge<T, U>>
public Iterable<Edge<T, U>>
public Iterable<Edge<T, U>>
public T
public T
public Iterable<T>
public Iterable<T>
public Iterable<T>
public T
public T
public Iterable<T>
public Iterable<T>
public Iterable<T>
public Edge<T, U>
public Edge<T, U>
public Collection<Edge<T, U>>
public Iterable<Edge<T, U>>
public Iterable<Edge<T, U>>
public int
public int
public void
public void
public void
public boolean
removeEdgeTo(Vertex<T extends ExplicitVertexID, U> destination)

protected void
protected void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

databack to summary
private T data
EMPTY_EDGE_LISTback to summary
private static final Edge<T extends ExplicitVertexID, U>[] EMPTY_EDGE_LIST
graphback to summary
private DirectedGraph<T extends ExplicitVertexID, U> graph
idback to summary
pack-priv int id
incomingback to summary
private Edge<T, U>[] incoming
incomingLengthback to summary
private int incomingLength
outgoingback to summary
private Edge<T, U>[] outgoing
outgoingLengthback to summary
private int outgoingLength

Constructor Detail

Vertexback to summary
public Vertex(DirectedGraph<T extends ExplicitVertexID, U> graph, T data, int id)

Method Detail

addEdgeToback to summary
public void addEdgeTo(Vertex<T extends ExplicitVertexID, U> destination)
addEdgeToback to summary
public void addEdgeTo(Vertex<T extends ExplicitVertexID, U> destination, U type)
addEdgeToback to summary
public void addEdgeTo(T destination)
addEdgeToback to summary
public void addEdgeTo(T destination, U type)
addIncomingEdgeback to summary
protected void addIncomingEdge(Edge<T, U> newEdge)
addOutgoingEdgeback to summary
protected void addOutgoingEdge(Edge<T, U> newEdge)
compareToback to summary
public int compareTo(Vertex<T, U> that)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
that:Vertex<T, U>

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
getDataback to summary
public T getData()
getFirstEdgeback to summary
private Edge<T, U> getFirstEdge(Iterator<Edge<T, U>> iterator)
getIDback to summary
public int getID()
getIncomingEdgeback to summary
public Edge<T, U> getIncomingEdge()
getIncomingEdgeOfTypeback to summary
public Edge<T, U> getIncomingEdgeOfType(U type)
getIncomingEdgesback to summary
public Collection<Edge<T, U>> getIncomingEdges()
getIncomingEdgesNotOfTypeback to summary
public Iterable<Edge<T, U>> getIncomingEdgesNotOfType(U type)
getIncomingEdgesOfTypeback to summary
public Iterable<Edge<T, U>> getIncomingEdgesOfType(U type)
getIncomingSourceDataback to summary
public T getIncomingSourceData()
getIncomingSourceDataOfTypeback to summary
public T getIncomingSourceDataOfType(U type)
getIncomingSourcesDataback to summary
public Iterable<T> getIncomingSourcesData()
getIncomingSourcesDataNotOfTypeback to summary
public Iterable<T> getIncomingSourcesDataNotOfType(U type)
getIncomingSourcesDataOfTypeback to summary
public Iterable<T> getIncomingSourcesDataOfType(U type)
getOutgoingDestinationDataback to summary
public T getOutgoingDestinationData()
getOutgoingDestinationDataOfTypeback to summary
public T getOutgoingDestinationDataOfType(U type)
getOutgoingDestinationsDataback to summary
public Iterable<T> getOutgoingDestinationsData()
getOutgoingDestinationsDataNotOfTypeback to summary
public Iterable<T> getOutgoingDestinationsDataNotOfType(Object type)
getOutgoingDestinationsDataOfTypeback to summary
public Iterable<T> getOutgoingDestinationsDataOfType(Object type)
getOutgoingEdgeback to summary
public Edge<T, U> getOutgoingEdge()
getOutgoingEdgeOfTypeback to summary
public Edge<T, U> getOutgoingEdgeOfType(U type)
getOutgoingEdgesback to summary
public Collection<Edge<T, U>> getOutgoingEdges()
getOutgoingEdgesNotOfTypeback to summary
public Iterable<Edge<T, U>> getOutgoingEdgesNotOfType(U type)
getOutgoingEdgesOfTypeback to summary
public Iterable<Edge<T, U>> getOutgoingEdgesOfType(U type)
inDegreeback to summary
public int inDegree()
outDegreeback to summary
public int outDegree()
removeAllEdgesback to summary
public void removeAllEdges()
removeAllIncomingEdgesback to summary
public void removeAllIncomingEdges()
removeAllOutgoingEdgesback to summary
public void removeAllOutgoingEdges()
removeEdgeToback to summary
public boolean removeEdgeTo(Vertex<T extends ExplicitVertexID, U> destination)
removeIncomingEdgeback to summary
protected void removeIncomingEdge(Edge<T, U> edge)
removeOutgoingEdgeback to summary
protected void removeOutgoingEdge(Edge<T, U> edge)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
org.jruby.dirgra back to summary

pack-priv Class Vertex.DestinationCompare

extends Object
implements Comparator<Edge<T extends ExplicitVertexID, U>>
Class Inheritance
All Implemented Interfaces
java.util.Comparator

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
compare(Edge<T, U>
the first object to be compared.
o1
,
Edge<T, U>
the second object to be compared.
o2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DestinationCompareback to summary
pack-priv DestinationCompare()

Method Detail

compareback to summary
public int compare(Edge<T, U> o1, Edge<T, U> o2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
o1:Edge<T, U>

the first object to be compared.

o2:Edge<T, U>

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Annotations
@Override
org.jruby.dirgra back to summary

pack-priv Class Vertex.SourceCompare

extends Object
implements Comparator<Edge<T extends ExplicitVertexID, U>>
Class Inheritance
All Implemented Interfaces
java.util.Comparator

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
compare(Edge<T, U>
the first object to be compared.
o1
,
Edge<T, U>
the second object to be compared.
o2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SourceCompareback to summary
pack-priv SourceCompare()

Method Detail

compareback to summary
public int compare(Edge<T, U> o1, Edge<T, U> o2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
o1:Edge<T, U>

the first object to be compared.

o2:Edge<T, U>

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Annotations
@Override