Package org.apache.graphar.edges
Interface EdgeIter
-
- All Superinterfaces:
com.alibaba.fastffi.CXXPointer,com.alibaba.fastffi.FFIPointer,com.alibaba.fastffi.FFIType
public interface EdgeIter extends com.alibaba.fastffi.CXXPointerThe iterator for traversing a type of edges.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceEdgeIter.Factory
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @com.alibaba.fastffi.FFINameAlias("cur_offset"),@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") longcurOffset()Get the current offset in the current chunk.@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") longdestination()Get the destination vertex id for the current edge.booleaneq(EdgeIter rhs)The equality operator.@com.alibaba.fastffi.FFINameAlias("first_dst") booleanfirstDst(EdgeIter from, @com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long id)Let the input iterator to point to the first incoming edge of the vertex with specific id after the current position of the iterator.@com.alibaba.fastffi.FFINameAlias("first_src") booleanfirstSrc(EdgeIter from, @com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long id)Let the input iterator to point to the first out-going edge of the vertex with specific id after the current position of the iterator.Edgeget()Construct and return the edge of the current offset.@com.alibaba.fastffi.FFINameAlias("global_chunk_index"),@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") longglobalChunkIndex()Get the global index of the current edge chunk.EdgeIterinc()The prefix increment operator.@com.alibaba.fastffi.FFINameAlias("is_end") booleanisEnd()Check if the current position is the end.@com.alibaba.fastffi.FFINameAlias("next_dst") booleannextDst()Point to the next edge with the same destination, return false if not found.@com.alibaba.fastffi.FFINameAlias("next_dst") booleannextDst(@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long id)Point to the next edge with the specific destination, return false if not found.@com.alibaba.fastffi.FFINameAlias("next_src") booleannextSrc()Point to the next edge with the same source, return false if not found.@com.alibaba.fastffi.FFINameAlias("next_src") booleannextSrc(@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long id)Point to the next edge with the specific source, return false if not found.<T> Result<T>property(StdString property, T tObject)Get the value for a property of the current vertex.@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") longsource()Get the source vertex id for the current edge.voidtoBegin()Let the iterator to point to the beginning.
-
-
-
Method Detail
-
get
Edge get()
Construct and return the edge of the current offset.
-
source
@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long source()Get the source vertex id for the current edge.
-
destination
@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long destination()Get the destination vertex id for the current edge.
-
property
<T> Result<T> property(StdString property, T tObject)
Get the value for a property of the current vertex.- Parameters:
property- StdString that describe property.tObject- An object that instance of the return type. Supporting types:StdString, Longe.g.
StdString name = StdString.create("name");
StdString nameProperty = vertexIter.property(name, name);If you don't want to create an object, cast `Xxx` class to `XxxGen` and call this method with `(ReturnType) null`.
e.g.
StdString nameProperty = ((VertexIterGen)vertexIter).property(StdString.create("name"), (StdString) null);- Returns:
- Result: The property value or error.
-
inc
EdgeIter inc()
The prefix increment operator.
-
eq
boolean eq(EdgeIter rhs)
The equality operator.
-
globalChunkIndex
@com.alibaba.fastffi.FFINameAlias("global_chunk_index"),@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long globalChunkIndex()Get the global index of the current edge chunk.
-
curOffset
@com.alibaba.fastffi.FFINameAlias("cur_offset"),@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long curOffset()Get the current offset in the current chunk.
-
firstSrc
@com.alibaba.fastffi.FFINameAlias("first_src") boolean firstSrc(EdgeIter from, @com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long id)Let the input iterator to point to the first out-going edge of the vertex with specific id after the current position of the iterator.- Parameters:
from- The input iterator.id- The vertex id.- Returns:
- If such edge is found or not.
-
firstDst
@com.alibaba.fastffi.FFINameAlias("first_dst") boolean firstDst(EdgeIter from, @com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long id)Let the input iterator to point to the first incoming edge of the vertex with specific id after the current position of the iterator.- Parameters:
from- The input iterator.id- The vertex id.- Returns:
- If such edge is found or not.
-
toBegin
void toBegin()
Let the iterator to point to the beginning.
-
isEnd
@com.alibaba.fastffi.FFINameAlias("is_end") boolean isEnd()Check if the current position is the end.
-
nextSrc
@com.alibaba.fastffi.FFINameAlias("next_src") boolean nextSrc()Point to the next edge with the same source, return false if not found.
-
nextDst
@com.alibaba.fastffi.FFINameAlias("next_dst") boolean nextDst()Point to the next edge with the same destination, return false if not found.
-
nextSrc
@com.alibaba.fastffi.FFINameAlias("next_src") boolean nextSrc(@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long id)Point to the next edge with the specific source, return false if not found.
-
nextDst
@com.alibaba.fastffi.FFINameAlias("next_dst") boolean nextDst(@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long id)Point to the next edge with the specific destination, return false if not found.
-
-