ARCcore.graph DirectedGraph API Parameter Objects
API Objects
Vertex Methods
Edge Methods
Container Methods
API Objects
DirectedGraph API Parameter Objects
DirectedGraph container conventions, vertex and edge input parameter object types.

Method notation

For convenience we abbreviate functions defined on the DirectedGraph prototype object, e.g. isVertex, using the notation DirectedGraph.isVertex.

But, you can't actually call DirectedGraph.isVertex using this syntax: DirectedGraph is the private constructor function and it's not exported. To construct a DirectedGraph instance call the software factory method arccore.graph.directed.create.

const graph = require('arccore').graph;
var digraph = graph.directed.create().result;
var foundStartVertex = digraph.isVertex("startVertex"); // e.g.

Vertex & Edge Method Input Parameters

See also: Vertex Methods, EdgeMethods, Serialization

Methods of the DirectedGraph class that operate on vertices and edges in the container (there are many) accept as input one of four standardized in-parameter types based on two dimenions: target entity (vertex vs. edge), and operation (read vs. write). Read operations query the state of the container but do not mutate it. Write operations mutate the state of the container.

Vertex Read Request

A vertex read request is a string that is interpreted as the unique ID of a vertex in a container.

var vertexReadRequest = "vertexID";
var bool foundIt = digraph.isVertex(vertexReadRequest);

Vertex Write Request

A vertex write request is an object with required string property u and optional data property p.

var vertexWriteRequest = {
    u: "vertexID",
    p: { notes: "data to associate with the 'vertexID' vertex in the container" }

Edge Read Request

An edge read request is an object with required string properties u and v.

var edgeReadRequest = { u: "Hello", v: "World" };
var boolFountIt = digraph.isEdge(edgeReadRequest);

Edge Write Request

An edge write request is an object with required sub-object e and optional data property p.

var edgeWriteRequest = {
    e: { u: "Hello", v: "World" },
    p: { notes: "Some data to associate with the edge from 'Hello' to 'World'" }
Encapsule Project, Seattle WA
Copyright © 2021 Chris Russell
Mon Apr 12 2021 11:46:41 GMT-0400 (Eastern Daylight Time)

undefined/@encapsule/holism v0.0.10
undefined/polytely-app-runtime v