Home | History | Annotate | Download | only in PBQP

Lines Matching full:costs

75       NodeEntry(VectorPtr Costs) : Costs(Costs) {}
97 VectorPtr Costs;
105 EdgeEntry(NodeId N1Id, NodeId N2Id, MatrixPtr Costs)
106 : Costs(Costs) {
117 Costs = nullptr;
169 MatrixPtr Costs;
378 /// @brief Add a node with the given costs.
379 /// @param Costs Cost vector for the new node.
382 NodeId addNode(OtherVectorT Costs) {
384 VectorPtr AllocatedCosts = CostAlloc.getVector(std::move(Costs));
392 /// @param Costs Cost vector ptr for the new node (must be convertible to
396 /// This method allows for fast addition of a node whose costs don't need
398 /// this is when duplicating costs from an existing node (when using a
403 NodeId addNodeBypassingCostAllocator(OtherVectorPtrT Costs) {
404 NodeId NId = addConstructedNode(NodeEntry(Costs));
410 /// @brief Add an edge between the given nodes with the given costs.
413 /// @param Costs Cost matrix for new edge.
416 EdgeId addEdge(NodeId N1Id, NodeId N2Id, OtherVectorT Costs) {
417 assert(getNodeCosts(N1Id).getLength() == Costs.getRows() &&
418 getNodeCosts(N2Id).getLength() == Costs.getCols() &&
421 MatrixPtr AllocatedCosts = CostAlloc.getMatrix(std::move(Costs));
431 /// @param Costs Cost matrix for new edge.
434 /// This method allows for fast addition of an edge whose costs don't need
436 /// this is when duplicating costs from an existing edge (when using a
442 OtherMatrixPtrT Costs) {
443 assert(getNodeCosts(N1Id).getLength() == Costs->getRows() &&
444 getNodeCosts(N2Id).getLength() == Costs->getCols() &&
447 EdgeId EId = addConstructedEdge(EdgeEntry(N1Id, N2Id, Costs));
471 /// @param Costs New costs to set.
473 void setNodeCosts(NodeId NId, OtherVectorT Costs) {
474 VectorPtr AllocatedCosts = CostAlloc.getVector(std::move(Costs));
477 getNode(NId).Costs = AllocatedCosts;
485 /// This method is primarily useful for duplicating costs
489 return getNode(NId).Costs;
513 /// @param Costs New cost matrix.
515 void updateEdgeCosts(EdgeId EId, OtherMatrixT Costs) {
516 MatrixPtr AllocatedCosts = CostAlloc.getMatrix(std::move(Costs));
519 getEdge(EId).Costs = AllocatedCosts;
527 /// This method is primarily useful for duplicating costs quickly by
531 return getEdge(EId).Costs;
538 return *getEdge(EId).Costs;