33 int idx_non_lsq_obj = 0;
57 if (edge->getCache().sizeValues() > 0)
return false;
58 if (edge->getCache().sizeJacobians() > 0)
return false;
62 if (edge->getCache().sizeValues() > 0)
return false;
63 if (edge->getCache().sizeJacobians() > 0)
return false;
67 if (edge->getCache().sizeValues() > 0)
return false;
68 if (edge->getCache().sizeJacobians() > 0)
return false;
72 if (edge->getCache().sizeValues() > 0)
return false;
73 if (edge->getCache().sizeJacobians() > 0)
return false;
77 if (edge->getObjectiveCache().sizeValues() > 0)
return false;
78 if (edge->getObjectiveCache().sizeJacobians() > 0)
return false;
79 if (edge->getEqualityCache().sizeValues() > 0)
return false;
80 if (edge->getEqualityCache().sizeJacobians() > 0)
return false;
81 if (edge->getInequalityCache().sizeValues() > 0)
return false;
82 if (edge->getInequalityCache().sizeJacobians() > 0)
return false;
95 edge->getObjectiveCache().clear();
96 edge->getEqualityCache().clear();
97 edge->getInequalityCache().clear();
103 if (edges.empty())
return;
106 int n = edges.size();
107 for (
int i = 0; i <
n; ++i)
111 idx = edges[i]->getEdgeIdx() + edges[i]->getDimension();
115 idx = edges[i]->getEdgeIdx() + 1;
123 if (edges.empty())
return;
126 int n = edges.size();
127 for (
int i = 0; i <
n; ++i)
129 idx = edges[i]->getEdgeIdx() + edges[i]->getDimension();
136 if (edges.empty())
return;
138 if (edges[0]->isObjectiveLeastSquaresForm())
140 setEdgeIdx(*edges[0], idx_lsq_obj, idx_eq, idx_ineq);
144 setEdgeIdx(*edges[0], idx_obj, idx_eq, idx_ineq);
147 int n = edges.size();
148 for (
int i = 0; i <
n; ++i)
150 if (edges[i]->isObjectiveLeastSquaresForm())
152 idx_obj = edges[i]->getEdgeObjectiveIdx() + edges[i]->getObjectiveDimension();
156 idx_obj = edges[i]->getEdgeObjectiveIdx() + 1;
158 idx_eq = edges[i]->getEdgeEqualityIdx() + edges[i]->getEqualityDimension();
159 idx_ineq = edges[i]->getEdgeInequalityIdx() + edges[i]->getInequalityDimension();
163 setEdgeIdx(*edges[i + 1], edges[i]->isObjectiveLeastSquaresForm() ? idx_lsq_obj : idx_obj, idx_eq, idx_ineq);
170 vertices.clearConnectedEdges();
178 for (
int i = 0; i < edge->getNumVertices(); ++i) edge->getVertexRaw(i)->registerObjectiveEdge(edge.get());
182 for (
int i = 0; i < edge->getNumVertices(); ++i) edge->getVertexRaw(i)->registerLsqObjectiveEdge(edge.get());
186 for (
int i = 0; i < edge->getNumVertices(); ++i) edge->getVertexRaw(i)->registerEqualityEdge(edge.get());
190 for (
int i = 0; i < edge->getNumVertices(); ++i) edge->getVertexRaw(i)->registerInequalityEdge(edge.get());
194 for (
int i = 0; i < edge->getNumVertices(); ++i) edge->getVertexRaw(i)->registerMixedEdge(edge.get());
208 if (edge->getDimension() > 0)
216 lsq_obj_dim += edge->getDimension();
220 eq_dim += edge->getDimension();
224 ineq_dim += edge->getDimension();
228 if (edge->isObjectiveLeastSquaresForm())
229 lsq_obj_dim += edge->getObjectiveDimension();
233 eq_dim += edge->getEqualityDimension();
234 ineq_dim += edge->getInequalityDimension();