20 #ifndef PlaneGCSSolver_Solver_H_
21 #define PlaneGCSSolver_Solver_H_
23 #include <PlaneGCSSolver_Defs.h>
24 #include <PlaneGCSSolver_ConstraintWrapper.h>
53 const std::list<GCSConstraintPtr>& theConstraints);
80 void diagnose(
const GCS::Algorithm& theAlgo = GCS::DogLeg);
89 void collectConflicting(
bool withRedundant =
true);
92 void addFictiveConstraintIfNecessary();
94 void removeFictiveConstraint();
97 typedef std::map<ConstraintID, std::list<GCSConstraintPtr> > ConstraintMap;
99 GCS::VEC_pD myParameters;
100 ConstraintMap myConstraints;
102 std::shared_ptr<GCS::System> myEquationSystem;
103 bool myDiagnoseBeforeSolve;
106 GCS::SET_I myConflictingIDs;
108 bool myConfCollected;
112 GCS::Constraint* myFictiveConstraint;
115 typedef std::shared_ptr<PlaneGCSSolver_Solver> SolverPtr;
The main class that performs the high-level operations for connection to the PlaneGCS.
Definition: PlaneGCSSolver_Solver.h:30
void addParameters(const GCS::SET_pD &theParams)
Add parameters created elsewhere.
Definition: PlaneGCSSolver_Solver.cpp:107
SolveStatus solve()
Solve the set of equations.
Definition: PlaneGCSSolver_Solver.cpp:147
bool isConflicting(const ConstraintID &theConstraint) const
Check the constraint is conflicted with others.
Definition: PlaneGCSSolver_Solver.cpp:207
void diagnose(const GCS::Algorithm &theAlgo=GCS::DogLeg)
Check conflicting/redundant constraints and DoF.
Definition: PlaneGCSSolver_Solver.cpp:239
SolveStatus
The result of constraints solution.
Definition: PlaneGCSSolver_Solver.h:33
void undo()
Revert solution to initial values.
Definition: PlaneGCSSolver_Solver.cpp:202
double * createParameter()
Initialize memory for new solver's parameter.
Definition: PlaneGCSSolver_Solver.cpp:96
void getFreeParameters(GCS::SET_pD &theFreeParams)
Return the list of modifiable parameters.
Definition: PlaneGCSSolver_Solver.cpp:246
void removeParameters(const GCS::SET_pD &theParams)
Release memory occupied by parameters.
Definition: PlaneGCSSolver_Solver.cpp:123
void initialize()
Preliminary initialization of solver (useful for moving a feature).
Definition: PlaneGCSSolver_Solver.cpp:134
void addConstraint(const ConstraintID &theMultiConstraintID, const std::list< GCSConstraintPtr > &theConstraints)
Add constraint to the system of equations.
Definition: PlaneGCSSolver_Solver.cpp:53
int dof()
Degrees of freedom.
Definition: PlaneGCSSolver_Solver.cpp:232
void clear()
Clear system of equations.
Definition: PlaneGCSSolver_Solver.cpp:42
void removeConstraint(const ConstraintID &theID)
Remove constraints from the system of equations.
Definition: PlaneGCSSolver_Solver.cpp:76