Example #1
0
 public EdgeInternal(int to, int rev, TCap cap, TCost cost)
 {
     To   = to;
     Rev  = rev;
     Cap  = cap;
     Cost = cost;
 }
Example #2
0
            public INode <TState, TCost> CreateChild(TState childstate, TCost stepcost)
            {
                var accumulatedcost = Traversal.Problem.Accumulate(Node.AccumulatedCost, stepcost);
                var distance        = Traversal.Scenario.GetDistance(childstate);
                var totalcost       = Traversal.Problem.Accumulate(accumulatedcost, distance);

                return(new Node.Primitive <TState, TCost>(Node, childstate, accumulatedcost, distance, totalcost));
            }
Example #3
0
 public Edge(int from, int to, TCap cap, TCap flow, TCost cost)
 {
     From = from;
     To   = to;
     Cap  = cap;
     Flow = flow;
     Cost = cost;
 }
Example #4
0
 public void Set(TData data, TCost cost)
 {
     this.Data = data;
     this.Cost = cost;
 }