Traveler for A* searcher.
Graph (directed) edge.
Graph (directed) edge. For an edge 1 - follows -> 3,
"1" and "3" are vertex ids, follows
is the label of edge.
Vertex 1 is the out vertex
of edge, and vertex 3 is the in vertex
.
Besides the label, an edge may have optional data.
Graph with update operators.
Graph serializer.
Graph serializer. By default, edge label size is up to 256, vertex property size is up to 64KB, overall data size of each edge is up to 10MB.
The Gremlin Graph Traversal Machine and Language
Graphs are mathematical structures used to model pairwise relations between objects.
Graphs are mathematical structures used to model pairwise relations between objects. A graph is made up of vertices (nodes) which are connected by edges (arcs or lines). A graph may be undirected, meaning that there is no distinction between the two vertices associated with each edge, or its edges may be directed from one vertex to another. Directed graphs are also called digraphs and directed edges are also called arcs or arrows.
A multigraph is a graph which is permitted to have multiple edges (also called parallel edges), that is, edges that have the same end nodes. The ability to support parallel edges simplifies modeling scenarios where there can be multiple relationships (e.g., co-worker and friend) between the same vertices.
In a property graph, the generic mathematical graph is often extended to support user defined objects attached to each vertex and edge. The edges also have associated labels denoting the relationships, which are important in a multigraph.
Unicorn supports directed property multigraphs. Documents from different tables can be added as vertices to a multigraph. It is also okay to add vertices without corresponding to documents. Each relationship/edge has a label and optional data (any valid JsValue, default value JsInt(1)).
Unicorn stores graphs in adjacency lists. That is, a graph is stored as a BigTable whose rows are vertices with their adjacency list. The adjacency list of a vertex contains all of the vertex’s incident edges (in and out edges are in different column families).
Because large graphs are usually very sparse, an adjacency list is significantly more space-efficient than an adjacency matrix. Besides, the neighbors of each vertex may be listed efficiently with an adjacency list, which is important in graph traversals. With our design, it is also possible to test whether two vertices are adjacent to each other for a given relationship in constant time.
Simple graph visitor with cache management.
Simple graph visitor with cache management.
In DFS and BFS, the user should create a sub class overriding
the apply
method, which is nop by default.
Graph traveler is a proxy to the graph during the graph traversal.
Graph traveler is a proxy to the graph during the graph traversal. Beyond the visitor design pattern that process a vertex during the traversal, the traveler also provides the method to access graph vertices, the neighbors of a vertex to explore, and the weight of an edge.
Graph vertex.
The edges to follow in a graph traversal.
Advanced graph operations.
Vertex color mark in a graph graversal.