Interface VertexArray<VID,​T>

  • Type Parameters:
    T - vertex data type.
    VID - vertex id type.
    All Superinterfaces:
    com.alibaba.fastffi.CXXPointer, com.alibaba.fastffi.FFIPointer, FFIType, Serializable
    All Known Implementing Classes:
    VertexArray_cxx_0xbe45efc3, VertexArray_cxx_0xd8921725, VertexArray_cxx_0xd8bd4666

    public interface VertexArray<VID,​T>
    extends com.alibaba.fastffi.FFIPointer, com.alibaba.fastffi.CXXPointer
    Vertex Array grape::VertexArray. An array which each slot binds to a vertex. Different from GSVertexArray, this class VID_T as a template parameter rather than fixed to int64_t.

    In c++ the first type param is VertexRange, so be careful when specify templates.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  VertexArray.Factory<VID,​T>
      Factory class for VertexArray.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T get​(Vertex<VID> vertex)
      Get the data bound to a vertex.
      VertexRange<VID> GetVertexRange()
      Get the underlying vertex range.
      void init​(VertexRange<VID> range)
      Init a vertex array with a range of vertices.
      void init​(VertexRange<VID> range, T val)
      Init a vertex array with a range of vertices, with initial value specified.
      void setValue​(Vertex<VID> vertex, T val)
      Bind a specific vertex with one value.
      void setValue​(VertexRange<VID> range, T val)
      Full fill the vertex array with specified value in a specific range.
      void setValue​(T val)
      Full fill the vertex array with specified value.
      • 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> range)
        Init a vertex array with a range of vertices.
        Parameters:
        range - vertex range.
      • init

        void init​(VertexRange<VID> range,
                  T val)
        Init a vertex array with a range of vertices, with initial value specified.
        Parameters:
        range - vertex range.
        val - initial value.
      • setValue

        void setValue​(T val)
        Full fill the vertex array with specified value.
        Parameters:
        val - value to fill in this array.
      • setValue

        void setValue​(VertexRange<VID> range,
                      T val)
        Full fill the vertex array with specified value in a specific range.
        Parameters:
        range - value to fill in this array.
        val - vertex range.
      • setValue

        void setValue​(Vertex<VID> vertex,
                      T val)
        Bind a specific vertex with one value.
        Parameters:
        vertex - vertex.
        val - value to bind.
      • get

        T get​(Vertex<VID> vertex)
        Get the data bound to a vertex.
        Parameters:
        vertex - querying vertex.
        Returns:
        bound value.
      • GetVertexRange

        VertexRange<VID> GetVertexRange()
        Get the underlying vertex range.
        Returns:
        the underlying vertex range.