Class DefaultDomainView

java.lang.Object
org.impulsegraph.vm.traversal.DefaultDomainView
All Implemented Interfaces:
DomainView

public class DefaultDomainView extends Object implements DomainView
Domain Anchor Context implementation.
  • Constructor Details

  • Method Details

    • getOrCreate

      public static DomainView getOrCreate(ImpulseGraphSnapshot snapshot, String domainName, int domainId, long nodeCount)
    • domainName

      public String domainName()
      Description copied from interface: DomainView
      Domain name identifier (e.g. "User", "WineInventory").
      Specified by:
      domainName in interface DomainView
    • domainId

      public int domainId()
      Description copied from interface: DomainView
      Physical domain ID index in the snapshot catalog.
      Specified by:
      domainId in interface DomainView
    • nodeCount

      public long nodeCount()
      Description copied from interface: DomainView
      Total number of nodes in this domain ($N_d$).
      Specified by:
      nodeCount in interface DomainView
    • all

      public Traversal<ImpulseBitSet> all()
      Description copied from interface: DomainView
      Initializes frontier containing ALL nodes in this domain ($0 \dots N_d-1$).
      Specified by:
      all in interface DomainView
    • attributeNames

      public List<String> attributeNames()
      Description copied from interface: DomainView
      Returns the list of attribute names defined for this domain.
      Specified by:
      attributeNames in interface DomainView
    • attributeSegments

      public List<MemorySegment> attributeSegments()
      Description copied from interface: DomainView
      Returns the list of off-heap MemorySegments for all attributes in this domain.
      Specified by:
      attributeSegments in interface DomainView
    • attributeSegment

      public MemorySegment attributeSegment(String attributeName)
      Description copied from interface: DomainView
      Returns the off-heap MemorySegment for the named attribute in this domain.
      Specified by:
      attributeSegment in interface DomainView
    • attributeSegment

      public MemorySegment attributeSegment(int attributeIndex)
      Description copied from interface: DomainView
      Returns the off-heap MemorySegment for the attribute at index in this domain.
      Specified by:
      attributeSegment in interface DomainView
    • keyAttrIndex

      public int keyAttrIndex()
      Description copied from interface: DomainView
      Returns the 0-indexed attribute index holding the primary key column, or 0xFFFF if none.
      Specified by:
      keyAttrIndex in interface DomainView
    • toDenseId

      public long toDenseId(String key)
      Description copied from interface: DomainView
      Look up the dense node ID (0 ... N_d - 1) for an external business key (e.g. "DB00001", "user_alice").
      Specified by:
      toDenseId in interface DomainView
      Parameters:
      key - External business key string
      Returns:
      Dense node ID (0 ... N_d - 1), or -1 if not found
    • toKey

      public String toKey(long denseId)
      Description copied from interface: DomainView
      Look up the external business key string for a dense node ID.
      Specified by:
      toKey in interface DomainView
      Parameters:
      denseId - Dense node ID (0 ... N_d - 1)
      Returns:
      External key string, or null/fallback if not found
    • from

      public Traversal<ImpulseBitSet> from(long nodeId)
      Description copied from interface: DomainView
      Initializes frontier with a single scalar seed node ID.
      Specified by:
      from in interface DomainView
    • from

      public Traversal<ImpulseBitSet> from(long... nodeIds)
      Description copied from interface: DomainView
      Initializes frontier with a batch array of seed node IDs.
      Specified by:
      from in interface DomainView
    • from

      public Traversal<ImpulseBitSet> from(ImpulseBitSet bitset)
      Description copied from interface: DomainView
      Initializes frontier with an existing bitset.
      Specified by:
      from in interface DomainView
    • multiLane

      public MultiLaneBuilder multiLane()
      Description copied from interface: DomainView
      Returns a builder for 64-lane bit-sliced multi-seed/concept-group traversals anchored in this domain.
      Specified by:
      multiLane in interface DomainView
    • vectorSearch

      public Traversal<ImpulseBitSet> vectorSearch(String indexOrAttr, float[] queryVector, int topK)
      Description copied from interface: DomainView
      Initializes a traversal frontier from an Approximate Nearest Neighbor (ANN) vector search over the given embedding index or float attribute.
      Specified by:
      vectorSearch in interface DomainView