Package com.alibaba.graphscope.app
Interface DefaultAppBase<OID_T,VID_T,VDATA_T,EDATA_T,C extends DefaultContextBase<OID_T,VID_T,VDATA_T,EDATA_T>>
-
- Type Parameters:
OID_T
- original id typeVID_T
- vertex id typeVDATA_T
- vertex data typeEDATA_T
- edge data typeC
- context type
- All Superinterfaces:
AppBase<OID_T,VID_T,VDATA_T,EDATA_T,C>
- All Known Implementing Classes:
GiraphComputationAdaptor
public interface DefaultAppBase<OID_T,VID_T,VDATA_T,EDATA_T,C extends DefaultContextBase<OID_T,VID_T,VDATA_T,EDATA_T>> extends AppBase<OID_T,VID_T,VDATA_T,EDATA_T,C>
The base interface for all sequential PIE apps which work along withIFragment
andDefaultMessageManager
To define your sequential graph algorithms, you should implement this interface and provide the corresponding implementation for
PEval(IFragment, DefaultContextBase, DefaultMessageManager)
andIncEval(IFragment, DefaultContextBase, DefaultMessageManager)
User-defined app shall work along with user-defined context, which should be an implementation of
DefaultContextBase
.For example, you can implement your app like this.
{ class MyContext implements DefaultContextBase<Long, Long, Long, Double> { public void Init(IFragment<Long, Long, Long, Double> frag, DefaultMessageManager messageManager, StdVector<FFIByteString> args) { } public void Output(IFragment<Long, Long, Long, Double> frag) { } } class MyApp implements DefaultAppBase<Long, Long, Long, Double, MyContext> { public void PEval(IFragment<Long, Long, Long, Double> graph, DefaultContextBase context, DefaultMessageManager messageManager) { } public void IncEval(IFragment<Long, Long, Long, Double> graph, DefaultContextBase context, DefaultMessageManager messageManager) { } } }
For more examples, please refer to module com.alibaba.graphscope.grape-demo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
IncEval(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> graph, DefaultContextBase<OID_T,VID_T,VDATA_T,EDATA_T> context, DefaultMessageManager messageManager)
Incremental Evaluation to implement.void
PEval(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> graph, DefaultContextBase<OID_T,VID_T,VDATA_T,EDATA_T> context, DefaultMessageManager messageManager)
Partial Evaluation to implement.
-
-
-
Method Detail
-
PEval
void PEval(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> graph, DefaultContextBase<OID_T,VID_T,VDATA_T,EDATA_T> context, DefaultMessageManager messageManager)
Partial Evaluation to implement.- Parameters:
graph
- fragment. The graph fragment providing accesses to graph data.context
- context. User defined context which manages data during the whole computations.messageManager
- The message manger which manages messages between fragments.- See Also:
IFragment
,DefaultContextBase
,DefaultMessageManager
-
IncEval
void IncEval(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> graph, DefaultContextBase<OID_T,VID_T,VDATA_T,EDATA_T> context, DefaultMessageManager messageManager)
Incremental Evaluation to implement.- Parameters:
graph
- fragment. The graph fragment providing accesses to graph data.context
- context. User defined context which manages data during the whole computations.messageManager
- The message manger which manages messages between fragments.- See Also:
IFragment
,DefaultContextBase
,DefaultMessageManager
-
-