|
|
monomial.c File ReferenceImplementations of the functions operating on Tmonomial. More... #include "monomial.h" #include "error.h" #include "defines.h" #include <math.h> Go to the source code of this file.
Detailed DescriptionImplementations of the functions operating on Tmonomial.
Definition in file monomial.c. Function Documentation
Defines an empty monomial.
Definition at line 17 of file monomial.c. References Tmonomial::ct, Tmonomial::empty, InitVarSet(), TRUE, and Tmonomial::vars. Referenced by AddTerm2SearchCriterion(), ApplyLinkRot(), DeriveMonomial(), DummifyAndAddEquation(), EquationFromLinearConstraint(), EquationFromLinearConstraintProduct(), GenerateCrossProductEquations(), GenerateDotProductEquation(), GenerateEquationsFromBranch(), GenerateGeneralNormEquation(), GenerateJointEquations(), GenerateJointEquationsInBranch(), GenerateJointRangeEquations(), GenerateScaledParabolaEquation(), GenerateScaledSaddleEquation(), and VarScaleEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Removes the information stored in the monomial, but does not frees the memory. It is more efficient to use ResetMonomial instead of DeleteMonomial plus InitMonomial again.
Definition at line 24 of file monomial.c. References Tmonomial::ct, Tmonomial::empty, ResetVarSet(), TRUE, and Tmonomial::vars. Referenced by AddTerm2SearchCriterion(), ApplyLinkRot(), FixVariableInMonomial(), GenerateCrossProductEquations(), GenerateDotProductEquation(), GenerateEquationsFromBranch(), GenerateGeneralNormEquation(), GenerateJointEquations(), GenerateJointEquationsInBranch(), GenerateJointRangeEquations(), GenerateScaledParabolaEquation(), GenerateScaledSaddleEquation(), ReplaceVariableInMonomial(), and SetMonomialCt().
Here is the call graph for this function:
Here is the caller graph for this function:
Removes a variable from a monomial converting it into a constant. Note, that variables are indexed and that removing a variable shifts down the index of variables with index above the removed variable.
Definition at line 31 of file monomial.c. References Tmonomial::ct, GetPlaceinSet(), GetVariablePowerN(), NO_UINT, RemoveVariableFromSet(), ResetMonomial(), ShiftVarIndexes(), Tmonomial::vars, and ZERO. Referenced by ReplaceVariableInEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Replaces a variable from a monomial converting it into a another variable via a linear relation
Definition at line 50 of file monomial.c. References AddVariable2Set(), Tmonomial::ct, GetPlaceinSet(), GetVariablePowerN(), NO_UINT, RemoveVariableFromSet(), ResetMonomial(), ShiftVarIndexes(), Tmonomial::vars, and ZERO.
Here is the call graph for this function:
Checks if a monomial is empty.
Definition at line 71 of file monomial.c. References Tmonomial::empty. Referenced by AddMonomial().
Here is the caller graph for this function:
Checks if a monomial is constant.
Definition at line 76 of file monomial.c. References Tmonomial::empty, VariableSetSize(), and Tmonomial::vars. Referenced by AddMonomial(), BilinearEquation(), and LinearEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Checks if a monomial is quadratic: K*x^2, with K a constant.
Definition at line 82 of file monomial.c. References GetVariablePowerN(), VariableSetSize(), and Tmonomial::vars. Referenced by BilinearEquation(), CircleEquation(), ParabolaEquation(), and SphereEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Checks if a monomial is bilineal: K*x*y, with K a constant.
Definition at line 88 of file monomial.c. References GetVariablePowerN(), VariableSetSize(), and Tmonomial::vars. Referenced by BilinearEquation(), and SaddleEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Checks if a monomial is bilineal: K*y, with K a constant.
Definition at line 95 of file monomial.c. References GetVariablePowerN(), VariableSetSize(), and Tmonomial::vars. Referenced by BilinearEquation(), LinearEquation(), ParabolaEquation(), and SaddleEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Gets the order of a monomial. Here the order is the sum of the powers of the variables in the monomial (0 for constant, 1 for lineal, 2 for quadratic and bilineal).
Definition at line 101 of file monomial.c. References Tmonomial::vars, and VarSetOrder(). Referenced by AddMonomial(), and RewriteEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Copies a constructor copying the data from another monomial.
Definition at line 106 of file monomial.c. References CopyVarSet(), Tmonomial::ct, Tmonomial::empty, and Tmonomial::vars. Referenced by AccumulateEquations(), AddMonomial(), and ReplaceVariableInEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Compare two given monomials. Monomials are compared first taking into account the variables and then their scale factor.
Definition at line 113 of file monomial.c. References CmpVarSet(), Tmonomial::ct, Tmonomial::empty, and Tmonomial::vars. Referenced by AddMonomial(), and CmpEquations().
Here is the call graph for this function:
Here is the caller graph for this function:
Gets the scale factor of a monomial.
Definition at line 146 of file monomial.c. References Tmonomial::ct, and Tmonomial::empty. Referenced by AddMonomial(), CircleEquation(), CropEquation(), DummifyAndAddEquation(), GaussianElimination(), IsSimplificable(), LinearEquation2LinearConstraint(), NormalizeEquation(), ParabolaEquation(), PurgeEquation(), RewriteEquation(), SaddleEquation(), SetEquationInfo(), and SphereEquation().
Here is the caller graph for this function:
Changes the scale factor of a monomial.
Definition at line 154 of file monomial.c. References Tmonomial::ct, Tmonomial::empty, FALSE, ResetMonomial(), and ZERO. Referenced by AddMonomial(), and NormalizeEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Gets the variables of a monomial.
Definition at line 163 of file monomial.c. References Tmonomial::vars. Referenced by AddMonomial(), CropEquation(), DummifyAndAddEquation(), FindMonomial(), IsSimplificable(), LinearEquation2LinearConstraint(), LinearizeParabolaEquation(), LinearizeSaddleEquation(), ReplaceVariableInEquation(), RewriteEquation(), SetEquationInfo(), and VarScaleEquation().
Here is the caller graph for this function:
Scales a monomial.
Definition at line 168 of file monomial.c. References Tmonomial::ct, Tmonomial::empty, FALSE, and ZERO. Referenced by AccumulateEquations(), AddTerm2SearchCriterion(), ApplyLinkRot(), CtScaleEquation(), DummifyAndAddEquation(), EquationFromLinearConstraint(), EquationFromLinearConstraintProduct(), GenerateCrossProductEquations(), GenerateDotProductEquation(), GenerateEquationsFromBranch(), GenerateJointEquations(), GenerateJointEquationsInBranch(), GenerateJointRangeEquations(), GenerateScaledParabolaEquation(), GenerateScaledSaddleEquation(), NormalizeEquation(), ReplaceVariableInEquation(), and VarScaleEquation().
Here is the caller graph for this function:
Adds a power variable to the monomial.
Definition at line 181 of file monomial.c. References AddVariable2Set(), Tmonomial::ct, Tmonomial::empty, FALSE, and Tmonomial::vars. Referenced by AddTerm2SearchCriterion(), ApplyLinkRot(), DummifyAndAddEquation(), EquationFromLinearConstraint(), EquationFromLinearConstraintProduct(), GenerateCrossProductEquations(), GenerateDotProductEquation(), GenerateEquationsFromBranch(), GenerateGeneralNormEquation(), GenerateJointEquations(), GenerateJointEquationsInBranch(), GenerateJointRangeEquations(), GenerateScaledParabolaEquation(), GenerateScaledSaddleEquation(), ReplaceVariableInEquation(), and VarScaleEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Evaluates a monomial for a given set of value for the variables.
Definition at line 193 of file monomial.c. References Tmonomial::ct, Tmonomial::empty, EvaluateVarSet(), VariableSetSize(), and Tmonomial::vars. Referenced by EvaluateEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Evaluates a monomial for a given set of ranges for the variables using interval arithmetics.
Definition at line 206 of file monomial.c. References Tmonomial::ct, Tmonomial::empty, EvaluateVarSetInt(), IntervalProduct(), NewInterval(), VariableSetSize(), Tmonomial::vars, and ZERO. Referenced by EvaluateEquationInt().
Here is the call graph for this function:
Here is the caller graph for this function:
Derives a monomial with respect to a given variable.
Definition at line 234 of file monomial.c. References Tmonomial::ct, DeriveVarSet(), Tmonomial::empty, FALSE, InitMonomial(), VarIncluded(), and Tmonomial::vars. Referenced by DeriveEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Writes a monomial to a given stream.
Definition at line 248 of file monomial.c. References Tmonomial::ct, Tmonomial::empty, EmptyVarSet(), PrintVarSet(), Tmonomial::vars, and ZERO. Referenced by PrintEquation(), and PrintMonomials().
Here is the call graph for this function:
Here is the caller graph for this function:
Deletes the information stored in the monomial and frees the allocated memory space.
Definition at line 282 of file monomial.c. References DeleteVarSet(), and Tmonomial::vars. Referenced by AccumulateEquations(), AddMonomial(), AddTerm2SearchCriterion(), ApplyLinkRot(), DeriveEquation(), DummifyAndAddEquation(), EquationFromLinearConstraint(), EquationFromLinearConstraintProduct(), GenerateCrossProductEquations(), GenerateDotProductEquation(), GenerateEquationsFromBranch(), GenerateGeneralNormEquation(), GenerateJointEquations(), GenerateJointEquationsInBranch(), GenerateJointRangeEquations(), GenerateScaledParabolaEquation(), GenerateScaledSaddleEquation(), ReplaceVariableInEquation(), ResetEquationMonomials(), and VarScaleEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
|