Interface DenseVertexSet<VID_T>

  • All Superinterfaces:
    com.alibaba.fastffi.CXXPointer, com.alibaba.fastffi.FFIPointer, FFIType, Serializable

    public interface DenseVertexSet<VID_T>
    extends com.alibaba.fastffi.FFIPointer, com.alibaba.fastffi.CXXPointer
    Java wrapper for grape DenseVertexSet. DenseVertexSet is able to maintain the indicator information for a vertex range.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  DenseVertexSet.Factory<VID_T>
      Factory for DenseVertexSet
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Clear this vertex set.
      @com.alibaba.fastffi.FFINameAlias("Count") long count()
      Count the number of vertices inserted into this set.
      boolean Empty()
      Check whether a empty set.
      void erase​(Vertex<VID_T> u)
      Remove one vertex from this vertexSet.
      @com.alibaba.fastffi.FFINameAlias("EraseWithRet") boolean eraseWithRet​(Vertex<VID_T> u)
      Remove one vertex with return value.
      @com.alibaba.fastffi.FFINameAlias("Exist") boolean exist​(Vertex<VID_T> u)
      Check whether a vertex exists in a vertex set.
      Bitset GetBitset()
      Get the underlying representation for this vertex set, a BitSet.
      void init​(VertexRange<VID_T> range)
      Init the vertex set with a range of vertices.
      void insert​(Vertex<VID_T> u)
      Insert one vertex into the set.
      @com.alibaba.fastffi.FFINameAlias("InsertWithRet") boolean insertWithRet​(Vertex<VID_T> u)
      Insert the vertex with return value.
      @com.alibaba.fastffi.FFINameAlias("PartialCount") long partialCount​(VID_T beg, VID_T end)
      Count the number of vertices inserted in a specified range.
      boolean PartialEmpty​(VID_T beg, VID_T end)
      Check whether any vertices inserted in a certain range.
      VertexRange<VID_T> range()
      Get the range for vertices.
      void swap​(DenseVertexSet<VID_T> rhs)
      Swap the state with another vertex set.
      • Methods inherited from interface com.alibaba.fastffi.CXXPointer

        delete
      • Methods inherited from interface com.alibaba.fastffi.FFIPointer

        getAddress
    • Method Detail

      • init

        void init​(VertexRange<VID_T> range)
        Init the vertex set with a range of vertices.
        Parameters:
        range - vertex range
      • insert

        void insert​(Vertex<VID_T> u)
        Insert one vertex into the set.
        Parameters:
        u - inserted vertex.
      • insertWithRet

        @com.alibaba.fastffi.FFINameAlias("InsertWithRet") boolean insertWithRet​(Vertex<VID_T> u)
        Insert the vertex with return value.
        Parameters:
        u - inserted vertex.
        Returns:
        true if this operation changes the corresponding bit, false if the vertex is already inserted.
      • erase

        void erase​(Vertex<VID_T> u)
        Remove one vertex from this vertexSet.
        Parameters:
        u - vertex to remove.
      • eraseWithRet

        @com.alibaba.fastffi.FFINameAlias("EraseWithRet") boolean eraseWithRet​(Vertex<VID_T> u)
        Remove one vertex with return value.
        Parameters:
        u - vertex to remove.
        Returns:
        true if this operation changes the corresponding bit, false if the vertex is already erased, or not in this set.
      • exist

        @com.alibaba.fastffi.FFINameAlias("Exist") boolean exist​(Vertex<VID_T> u)
        Check whether a vertex exists in a vertex set.
        Parameters:
        u - vertex to check.
        Returns:
        boolean indicates the vertex exist or not.
      • range

        VertexRange<VID_T> range()
        Get the range for vertices.
        Returns:
        the possible range for vertices in this vertex set.
      • count

        @com.alibaba.fastffi.FFINameAlias("Count") long count()
        Count the number of vertices inserted into this set.
        Returns:
        number of vertices in this set.
      • partialCount

        @com.alibaba.fastffi.FFINameAlias("PartialCount") long partialCount​(VID_T beg,
                                                                            VID_T end)
        Count the number of vertices inserted in a specified range.
        Parameters:
        beg - begin vertex id(inclusive).
        end - end vertex id(exclusive).
        Returns:
        count result
      • clear

        void clear()
        Clear this vertex set.
      • swap

        void swap​(DenseVertexSet<VID_T> rhs)
        Swap the state with another vertex set.
        Parameters:
        rhs - another vertex set
      • GetBitset

        Bitset GetBitset()
        Get the underlying representation for this vertex set, a BitSet.
        Returns:
        the underlying bitset.
        See Also:
        Bitset
      • Empty

        boolean Empty()
        Check whether a empty set.
        Returns:
        empty or not
      • PartialEmpty

        boolean PartialEmpty​(VID_T beg,
                             VID_T end)
        Check whether any vertices inserted in a certain range.
        Parameters:
        beg - begin index.
        end - end index.
        Returns:
        empty or not