public class

HashTableHipsterGraph

extends Object
implements HipsterGraph<V, E>
java.lang.Object
   ↳ es.usc.citius.hipster.extensions.graph.HashTableHipsterGraph<V, E>
Known Direct Subclasses

Class Overview

Implementation of a HipsterGraph using a Guava Hash Table.

Summary

Fields
protected Set<V> disconnected
protected HashBasedTable<V, V, GraphEdge<V, E>> graphTable
Public Constructors
HashTableHipsterGraph()
Public Methods
void add(V v)
GraphEdge<V, E> connect(V v1, V v2, E value)
static <V, E> HashTableHipsterGraph<V, E> create()
Iterable<GraphEdge<V, E>> edges()
Returns an Iterable of the edges in the graph.
Iterable<GraphEdge<V, E>> edgesOf(V vertex)
Return all the edges that are connected with the given vertex.
void remove(V v, GraphEdge<V, E> edge)
void remove(V v)
Iterable<V> vertices()
Returns an iterable of the vertices in the graph.
[Expand]
Inherited Methods
From class java.lang.Object
From interface es.usc.citius.hipster.graph.HipsterGraph

Fields

protected Set<V> disconnected

protected HashBasedTable<V, V, GraphEdge<V, E>> graphTable

Public Constructors

public HashTableHipsterGraph ()

Public Methods

public void add (V v)

public GraphEdge<V, E> connect (V v1, V v2, E value)

public static HashTableHipsterGraph<V, E> create ()

public Iterable<GraphEdge<V, E>> edges ()

Returns an Iterable of the edges in the graph.

Returns

public Iterable<GraphEdge<V, E>> edgesOf (V vertex)

Return all the edges that are connected with the given vertex.

Parameters
vertex vertex to be queried
Returns
  • an iterable of GraphEdges connected to the vertex

public void remove (V v, GraphEdge<V, E> edge)

public void remove (V v)

public Iterable<V> vertices ()

Returns an iterable of the vertices in the graph.

Returns
  • iterable of vertices