Class GraphMem2Roaring

All Implemented Interfaces:
Graph, GraphWithPerform

public class GraphMem2Roaring extends GraphMem2
A graph that stores triples in memory. This class is not thread-safe.

Purpose: GraphMem2Roaring is ideal for handling extremely large graphs. If you frequently work with such massive data structures, this implementation could be your top choice.

Graph#contains is faster than GraphMem2Fast. Removing triples is a bit slower than GraphMem2Legacy. Better performance than GraphMem2Fast for operations with triple matches for the pattern S_O, SP_, and _PO on large graphs,due to bit-operations to find intersecting triples. Memory consumption is about 7-99% higher than GraphMem2Legacy Suitable for really large graphs like bsbm-5m.nt.gz, bsbm-25m.nt.gz, and possibly even larger. Simple and straightforward implementation. No heritage of GraphMem.

Internal structure: - One indexed hash set (same as GraphMem2Fast uses) that holds all triples. - Three hash maps indexed by subjects, predicates, and objects with RoaringBitmaps as values. - The bitmaps contain the indices of the triples in the central hash set.

  • Constructor Details

    • GraphMem2Roaring

      public GraphMem2Roaring()