org.allenai.nlpstack.core.graph

Graph

class Graph[T] extends AnyRef

A graph representation where data is stored in vertices and edges are represented with adjacency lists.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Graph
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Graph(vertices: Iterable[T], edges: Iterable[Edge[T]])

  2. new Graph(edges: Iterable[Edge[T]])

  3. new Graph(edges: Set[Edge[T]])

  4. new Graph(vertices: Set[T], edges: Set[Edge[T]])

Type Members

  1. type E = Edge[T]

  2. type G = Graph[T]

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def areConnected(vertices: Iterable[T]): Boolean

    Test if the nodes are connected.

    Test if the nodes are connected. In other words, for each node, there exists another node in the set that is its neighbor.

  7. def areNeighbors(a: T, b: T): Boolean

    Test if the two nodes border each other.

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def bipaths(vertices: Set[T], maxLength: Option[Int] = None): Set[Bipath[T]]

  10. def bipaths(start: T, end: T): List[Bipath[T]]

  11. def canEqual(that: Any): Boolean

  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def collapse(set: Set[T])(implicit merge: (Traversable[T]) ⇒ T): Graph[T]

  14. def collapse(collapsable: (E) ⇒ Boolean)(implicit merge: (Traversable[T]) ⇒ T): G

  15. def collapseGroups(groups: Iterable[Set[T]])(implicit merge: (Traversable[T]) ⇒ T): Graph[T]

  16. def components(pred: (Edge[T]) ⇒ Boolean): Set[Set[T]]

  17. def connected(v: T, pred: (DirectedEdge[T]) ⇒ Boolean): Set[T]

  18. def dedges(vertex: T): Set[DirectedEdge[T]]

  19. def degree(v: T): Int

  20. def edges(vertex: T): Set[E]

  21. val edges: Set[Edge[T]]

  22. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. def equals(that: Any): Boolean

    Definition Classes
    Graph → AnyRef → Any
  24. def expand(vertices: Set[T], pred: (DirectedEdge[T]) ⇒ Boolean): Set[T]

  25. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  28. val incoming: Map[T, Set[Edge[T]]]

  29. def indegree(v: T): Int

  30. def inferiors(v: T, cond: (E) ⇒ Boolean = x => true): Set[T]

    Iteratively expand a vertex to all vertices beneath it.

    Iteratively expand a vertex to all vertices beneath it.

    returns

    the set of vertices beneath vertex

  31. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  32. def isTree(): Boolean

  33. def map[U](f: (T) ⇒ U): Graph[U]

  34. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  35. def neighbors(v: T): Set[T]

    all vertices seperated from v.

  36. def neighbors(v: T, pred: (DirectedEdge[T]) ⇒ Boolean): Set[T]

    all vertices seperated from v by a single edge that satisfied pred.

  37. final def notify(): Unit

    Definition Classes
    AnyRef
  38. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  39. def outdegree(v: T): Int

  40. val outgoing: Map[T, Set[Edge[T]]]

  41. def predecessors(v: T, pred: (Edge[T]) ⇒ Boolean): Set[T]

    all vertices before incoming edges to v that satisfy the supplied predicate.

  42. def predecessors(v: T): Set[T]

    all vertices before incoming edges to v.

  43. def print(): Unit

  44. def print(writer: Appendable): Unit

  45. def successors(v: T, pred: (Edge[T]) ⇒ Boolean): Set[T]

    all vertices after outgoing edges to v that satisfy the supplied predicate.

  46. def successors(v: T): Set[T]

    all vertices after outgoing edges to v.

  47. def superior(vertices: Set[T]): T

    Find the node which is most superior.

    Find the node which is most superior.

    Exceptions thrown
    IllegalArgumentException

    nodes are not connected or no one superior

  48. def superiors(v: T, cond: (E) ⇒ Boolean = x => true): Set[T]

    Iteratively expand a vertex to all vertices above it.

    Iteratively expand a vertex to all vertices above it.

    returns

    the set of vertices beneath vertex

  49. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  50. def toDot(): String

  51. def toString(): String

    Definition Classes
    Graph → AnyRef → Any
  52. def vertexBipaths(start: T, end: T): List[List[T]]

    Find a path from vertex (start) to vertex (end).

  53. val vertices: Set[T]

  54. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped