public static FunctionByEventsourceGraph<BigDecimal, BigDecimal> createGraphFunction() throws Exception
{
//The graph operations are increment, increment, negate, increment, increment, negate in a loop
BigDecimalUnaryOperation increment1 = new BigDecimalUnaryOperation(BigDecimalUnaryOperation.Operation.increment);
increment1.getInternalInformation().setName("Increment 1");
BoostRef edge1 = new BoostRef();
BigDecimalUnaryOperation increment2 = new BigDecimalUnaryOperation(BigDecimalUnaryOperation.Operation.increment);
increment2.getInternalInformation().setName("Increment 2");
BoostRef edge2 = new BoostRef();
BigDecimalUnaryOperation negate1 = new BigDecimalUnaryOperation(BigDecimalUnaryOperation.Operation.negate);
negate1.getInternalInformation().setName("Negate 1");
BoostRef edge3 = new BoostRef();
BigDecimalUnaryOperation increment3 = new BigDecimalUnaryOperation(BigDecimalUnaryOperation.Operation.increment);
increment3.getInternalInformation().setName("Increment 3");
BoostRef edge4 = new BoostRef();
BigDecimalUnaryOperation increment4 = new BigDecimalUnaryOperation(BigDecimalUnaryOperation.Operation.increment);
increment4.getInternalInformation().setName("Increment 4");
BoostRef edge5 = new BoostRef();
BigDecimalUnaryOperation negate2 = new BigDecimalUnaryOperation(BigDecimalUnaryOperation.Operation.increment);//new BigDecimalUnaryOperation(BigDecimalUnaryOperation.Operation.negate);
negate2.getInternalInformation().setName("Negate 2");
BoostRef edge6 = new BoostRef();
DirectedSparseGraph<BigDecimalUnaryOperation, BoostRef> graph = new DirectedSparseGraph<BigDecimalUnaryOperation, BoostRef>();
graph.addVertex(increment1);