All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jgrapht.graph.sample.GrayTestInstanceDataWorker Maven / Gradle / Ivy

package org.jgrapht.graph.sample;

import java.util.Map;

import org.jgrapht.graph.DagStatus;
import org.jgrapht.graph.dagger.VertexDataset;
import org.jgrapht.graph.dagger.VertexStateless;
import org.jgrapht.graph.pipeline.DataPipeline;

import com.spring.boxes.dollar.RandomUtils;

// 示例算子
public class GrayTestInstanceDataWorker implements DataPipeline {

    @Override
    public VertexDataset pipeline(String vertexId, Map context) {
        VertexStateless vertexDataset = new VertexStateless();
        vertexDataset.setDagStatus(DagStatus.RUNNING);
        context.put(vertexId, RandomUtils.randomNumber(5));
        vertexDataset.setContext(context);
        return vertexDataset;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy