Package com.alibaba.graphscope.ds
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.CXXPointerVertex Array grape::VertexArray. An array which each slot binds to a vertex. Different fromGSVertexArray, 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 interfaceVertexArray.Factory<VID,T>Factory class for VertexArray.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tget(Vertex<VID> vertex)Get the data bound to a vertex.VertexRange<VID>GetVertexRange()Get the underlying vertex range.voidinit(VertexRange<VID> range)Init a vertex array with a range of vertices.voidinit(VertexRange<VID> range, T val)Init a vertex array with a range of vertices, with initial value specified.voidsetValue(Vertex<VID> vertex, T val)Bind a specific vertex with one value.voidsetValue(VertexRange<VID> range, T val)Full fill the vertex array with specified value in a specific range.voidsetValue(T val)Full fill the vertex array with specified value.
-
-
-
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.
-
-