Package com.alibaba.graphscope.fragment
Interface EdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>
-
- Type Parameters:
OID_T
- original vertex id type.VID_T
- vertex id type in GraphScope.VDATA_T
- vertex data type.EDATA_T
- edge data type.
- All Superinterfaces:
com.alibaba.fastffi.FFIPointer
,FFIType
,FragmentBase<OID_T,VID_T,VDATA_T,EDATA_T>
,Serializable
- All Known Subinterfaces:
ArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>
,BaseArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>
,ImmutableEdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>
- All Known Implementing Classes:
ArrowProjectedFragment_cxx_0x2b7738c9
,ArrowProjectedFragment_cxx_0x2ba2680a
,ArrowProjectedFragment_cxx_0x3384a871
,ArrowProjectedFragment_cxx_0x4645b400
,ArrowProjectedFragment_cxx_0x508ada88
,ArrowProjectedFragment_cxx_0x50b609c9
,ArrowProjectedFragment_cxx_0x57bae832
,ArrowProjectedFragment_cxx_0x57e61773
,ArrowProjectedFragment_cxx_0x8724099f
,ArrowProjectedFragment_cxx_0xaa704f61
,ArrowProjectedFragment_cxx_0xafd47c78
,ArrowProjectedFragment_cxx_0xb2a7437
,ArrowProjectedFragment_cxx_0xb55a378
,ArrowProjectedFragment_cxx_0xc38050e6
,ArrowProjectedFragment_cxx_0xe3684916
,ArrowProjectedFragment_cxx_0xfab326b7
public interface EdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T> extends FragmentBase<OID_T,VID_T,VDATA_T,EDATA_T>
EdgecutFragment defines the interfaces of fragments with edgecut. To learn more about edge-cut and vertex-cut, please refers to https://spark.apache.org/docs/1.6.2/graphx-programming-guide.html#optimized-representationIf we have an edge a-<b cutted by the partitioner, and a is in frag_0, and b in frag_1. Then:a-<b is a crossing edge, a is an inner_vertex in frag_0, b is an outer_vertex in frag_0.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @com.alibaba.fastffi.FFINameAlias("GetInnerVertex") boolean
getInnerVertex(OID_T oid, Vertex<VID_T> vertex)
Check whether a vertex, represented in OID_T, is a inner vertex.VID_T
getInnerVertexGid(Vertex<VID_T> vertex)
Convert from outer vertex handle to its global id.OID_T
getInnerVertexId(Vertex<VID_T> vertex)
Obtain vertex id from original id, only for inner vertex.@com.alibaba.fastffi.FFINameAlias("GetInnerVerticesNum"),@com.alibaba.fastffi.CXXValue long
getInnerVerticesNum()
Get the number of inner vertices.@com.alibaba.fastffi.FFINameAlias("GetOuterVertex") boolean
getOuterVertex(OID_T oid, Vertex<VID_T> vertex)
Check whether a vertex, represented in OID_T, is a outer vertex.VID_T
getOuterVertexGid(Vertex<VID_T> vertex)
Convert from inner vertex handle to its global id.OID_T
getOuterVertexId(Vertex<VID_T> vertex)
Obtain vertex id from original id, only for outer vertex.@com.alibaba.fastffi.FFINameAlias("GetOuterVerticesNum"),@com.alibaba.fastffi.CXXValue long
getOuterVerticesNum()
Get the number of outer vertices.@com.alibaba.fastffi.FFINameAlias("InnerVertexGid2Vertex") boolean
innerVertexGid2Vertex(VID_T gid, Vertex<VID_T> vertex)
Convert from global id to an inner vertex handle.VertexRange<VID_T>
innerVertices()
Obtain vertex range contains all inner vertices.@com.alibaba.fastffi.FFINameAlias("IsInnerVertex") boolean
isInnerVertex(Vertex<VID_T> vertex)
Check whether a vertex is a inner vertex for a fragment.@com.alibaba.fastffi.FFINameAlias("IsOuterVertex") boolean
isOuterVertex(Vertex<VID_T> vertex)
Check whether a vertex is a outer vertex for a fragment.@com.alibaba.fastffi.FFINameAlias("OuterVertexGid2Vertex") boolean
outerVertexGid2Vertex(VID_T gid, Vertex<VID_T> vertex)
Convert from global id to an outer vertex handle.VertexRange<VID_T>
outerVertices()
Obtain vertex range contains all outer vertices.-
Methods inherited from interface com.alibaba.graphscope.fragment.FragmentBase
fid, fnum, getEdgeNum, getFragId, getId, getLocalInDegree, getLocalOutDegree, getTotalVerticesNum, getVertex, getVerticesNum, gid2Vertex, vertex2Gid, vertices
-
-
-
-
Method Detail
-
getInnerVerticesNum
@com.alibaba.fastffi.FFINameAlias("GetInnerVerticesNum"),@com.alibaba.fastffi.CXXValue long getInnerVerticesNum()
Get the number of inner vertices.- Returns:
- number of inner vertices.
-
getOuterVerticesNum
@com.alibaba.fastffi.FFINameAlias("GetOuterVerticesNum"),@com.alibaba.fastffi.CXXValue long getOuterVerticesNum()
Get the number of outer vertices.- Returns:
- umber of outer vertices.
-
innerVertices
VertexRange<VID_T> innerVertices()
Obtain vertex range contains all inner vertices.- Returns:
- vertex range.
-
outerVertices
VertexRange<VID_T> outerVertices()
Obtain vertex range contains all outer vertices.- Returns:
- vertex range.
-
isInnerVertex
@com.alibaba.fastffi.FFINameAlias("IsInnerVertex") boolean isInnerVertex(Vertex<VID_T> vertex)
Check whether a vertex is a inner vertex for a fragment.- Parameters:
vertex
- querying vertex.- Returns:
- true if is inner vertex.
-
isOuterVertex
@com.alibaba.fastffi.FFINameAlias("IsOuterVertex") boolean isOuterVertex(Vertex<VID_T> vertex)
Check whether a vertex is a outer vertex for a fragment.- Parameters:
vertex
- querying vertex.- Returns:
- true if is outer vertex.
-
getInnerVertex
@com.alibaba.fastffi.FFINameAlias("GetInnerVertex") boolean getInnerVertex(OID_T oid, Vertex<VID_T> vertex)
Check whether a vertex, represented in OID_T, is a inner vertex. If yes, if true and put inner representation id in the second param. Else return false.- Parameters:
oid
- querying vertex in OID_T.vertex
- placeholder for VID_T, if oid belongs to this fragment.- Returns:
- inner vertex or not.
-
getOuterVertex
@com.alibaba.fastffi.FFINameAlias("GetOuterVertex") boolean getOuterVertex(OID_T oid, Vertex<VID_T> vertex)
Check whether a vertex, represented in OID_T, is a outer vertex. If yes, if true and put outer representation id in the second param. Else return false.- Parameters:
oid
- querying vertex in OID_T.vertex
- placeholder for VID_T, if oid doesn't belong to this fragment.- Returns:
- outer vertex or not.
-
getInnerVertexId
OID_T getInnerVertexId(Vertex<VID_T> vertex)
Obtain vertex id from original id, only for inner vertex.- Parameters:
vertex
- querying vertex.- Returns:
- original id.
-
getOuterVertexId
OID_T getOuterVertexId(Vertex<VID_T> vertex)
Obtain vertex id from original id, only for outer vertex.- Parameters:
vertex
- querying vertex.- Returns:
- original id.
-
innerVertexGid2Vertex
@com.alibaba.fastffi.FFINameAlias("InnerVertexGid2Vertex") boolean innerVertexGid2Vertex(VID_T gid, Vertex<VID_T> vertex)
Convert from global id to an inner vertex handle.- Parameters:
gid
- Input global id.vertex
- Output vertex handle.- Returns:
- True if exists an inner vertex of this fragment with global id as gid, false otherwise.
-
outerVertexGid2Vertex
@com.alibaba.fastffi.FFINameAlias("OuterVertexGid2Vertex") boolean outerVertexGid2Vertex(VID_T gid, Vertex<VID_T> vertex)
Convert from global id to an outer vertex handle.- Parameters:
gid
- Input global id.vertex
- Output vertex handle.- Returns:
- True if exists an outer vertex of this fragment with global id as gid, false otherwise.
-
getOuterVertexGid
VID_T getOuterVertexGid(Vertex<VID_T> vertex)
Convert from inner vertex handle to its global id.- Parameters:
vertex
- Input vertex handle.- Returns:
- Global id of the vertex.
-
-