Class PageRankContext
-
- All Implemented Interfaces:
ContextBase,ParallelContextBase<Long,Long,Long,Double>
public class PageRankContext extends VertexDataContext<IFragment<Long,Long,Long,Double>,Double> implements ParallelContextBase<Long,Long,Long,Double>
-
-
Field Summary
Fields Modifier and Type Field Description doublealphaMessageInBuffer.FactorybufferFactoryintchunkSizedoubledanglingSumintdanglingVNumIntArrayWrapperdegreeExecutorServiceexecutorintmaxIterationDoubleArrayWrappernextResultDoubleArrayWrapperpagerankdoublesumDoubleTimeintsuperStepdoubleswapTimeintthread_num
-
Constructor Summary
Constructors Constructor Description PageRankContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidInit(IFragment<Long,Long,Long,Double> frag, ParallelMessageManager javaParallelMessageManager, com.alibaba.fastjson.JSONObject jsonObject)Called by grape framework, before any PEval.voidOutput(IFragment<Long,Long,Long,Double> frag)Output will be executed when the computations finalizes.intthread_num()-
Methods inherited from class com.alibaba.graphscope.context.VertexDataContext
createFFIContext, data, getDataClass
-
-
-
-
Field Detail
-
alpha
public double alpha
-
maxIteration
public int maxIteration
-
superStep
public int superStep
-
danglingSum
public double danglingSum
-
pagerank
public DoubleArrayWrapper pagerank
-
nextResult
public DoubleArrayWrapper nextResult
-
degree
public IntArrayWrapper degree
-
thread_num
public int thread_num
-
executor
public ExecutorService executor
-
bufferFactory
public MessageInBuffer.Factory bufferFactory
-
chunkSize
public int chunkSize
-
sumDoubleTime
public double sumDoubleTime
-
swapTime
public double swapTime
-
danglingVNum
public int danglingVNum
-
-
Method Detail
-
Init
public void Init(IFragment<Long,Long,Long,Double> frag, ParallelMessageManager javaParallelMessageManager, com.alibaba.fastjson.JSONObject jsonObject)
Description copied from interface:ParallelContextBaseCalled by grape framework, before any PEval. You can initiating data structures need during super steps here.- Specified by:
Initin interfaceParallelContextBase<Long,Long,Long,Double>- Parameters:
frag- The graph fragment providing accesses to graph data.javaParallelMessageManager- The message manger which manages messages between fragments.jsonObject- String args from cmdline.- See Also:
IFragment,ParallelMessageManager,JSONObject
-
Output
public void Output(IFragment<Long,Long,Long,Double> frag)
Description copied from interface:ParallelContextBaseOutput will be executed when the computations finalizes. Data maintained in this context shall be outputted here.
-
thread_num
public int thread_num()
-
-