public EdgeInternal(int to, int rev, TCap cap, TCost cost) { To = to; Rev = rev; Cap = cap; Cost = cost; }
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)); }
public Edge(int from, int to, TCap cap, TCap flow, TCost cost) { From = from; To = to; Cap = cap; Flow = flow; Cost = cost; }
public void Set(TData data, TCost cost) { this.Data = data; this.Cost = cost; }