|
|
variable_set.c File ReferenceImplementation of the functions operating on box Tvariable_set. More... #include "variable_set.h" #include "defines.h" #include <string.h> #include <math.h> Go to the source code of this file.
Detailed DescriptionImplementation of the functions operating on box Tvariable_set.
Definition in file variable_set.c. Function Documentation
Adds a variable index with a given power to a variable set. Private function used by different public functions.
Definition at line 33 of file variable_set.c. References Tvariable_set::maxvars, MEM_DUP, MEM_EXPAND, Tvariable_set::nvars, Tvariable_set::power, and Tvariable_set::var_id. Referenced by AddVariable2Set(), SubstractVarSet(), and UnionVarSet().
Here is the caller graph for this function:
Creates an empty set of variable indexes.
Definition at line 64 of file variable_set.c. References INIT_NUM_VARIABLES, Tvariable_set::maxvars, NEW, Tvariable_set::nvars, Tvariable_set::power, and Tvariable_set::var_id. Referenced by CopyEquation(), DeriveEquation(), InitEquation(), InitMonomial(), and SubstractVarSet().
Here is the caller graph for this function:
Removes the information stored in a variable set (variable identifiers and powers) but not the allocated memory. To re-use a Tvariable_set it is more efficient to reset the variable to re-use instead of deleting it and constructing a new set.
Definition at line 72 of file variable_set.c. References Tvariable_set::nvars. Referenced by AddMonomial(), ResetEquation(), ResetMonomial(), and VarScaleEquation().
Here is the caller graph for this function:
Creates a set of variable from the informatin stored in another set.
Definition at line 77 of file variable_set.c. References Tvariable_set::maxvars, NEW, Tvariable_set::nvars, Tvariable_set::power, and Tvariable_set::var_id. Referenced by CopyMonomial(), SubstractVarSet(), and UnionVarSet().
Here is the caller graph for this function:
When eliminating a variable from a problem, the indexes of the variables with an identifier above the removed varaible need to be decreased by one. This function performs this opearation for a single variable set. The variable that we are removing from the problem need to be removed before applying this operation. If the variable set still includes the variable to be removed this function triggers and error.
Definition at line 90 of file variable_set.c. References Error(), Tvariable_set::nvars, and Tvariable_set::var_id. Referenced by FixVariableInMonomial(), ReplaceVariableInEquation(), and ReplaceVariableInMonomial().
Here is the call graph for this function:
Here is the caller graph for this function:
Compare two given variable sets. Variable sets are compared first taking into account the numver of indexes they include, then the powers of the variables and, finally, the indexes of the variables.
Definition at line 103 of file variable_set.c. References Tvariable_set::nvars, Tvariable_set::power, and Tvariable_set::var_id. Referenced by CmpMonomial(), and FindMonomial().
Here is the caller graph for this function:
Checks if a variable set is empty.
Definition at line 146 of file variable_set.c. References Tvariable_set::nvars. Referenced by PrintMonomial().
Here is the caller graph for this function:
Gets the position of a variable index in a set of variable indexes.
Definition at line 151 of file variable_set.c. References FALSE, NO_UINT, and Tvariable_set::var_id. Referenced by FixVariableInMonomial(), ReplaceVariableInEquation(), ReplaceVariableInMonomial(), and VarIncluded().
Here is the caller graph for this function:
Determines if a variable index is included in a set of variable indexes.
Definition at line 169 of file variable_set.c. References GetPlaceinSet(), and NO_UINT. Referenced by DeriveMonomial(), RemoveEquationsWithVar(), UsedVarInEquations(), and UsedVarInNonDummyEquations().
Here is the call graph for this function:
Here is the caller graph for this function:
Determines if a variable index is included in a set of variable indexes with a given power.
Definition at line 174 of file variable_set.c. References FALSE, Tvariable_set::power, and Tvariable_set::var_id. Referenced by SubstractVarSet(), and VarSetIntersect().
Here is the caller graph for this function:
Determines if two variable sets have any element in common. To determine if two variable set elements are the same we take into account bot the variable index and its power.
Definition at line 190 of file variable_set.c. References FALSE, Included(), Tvariable_set::power, and Tvariable_set::var_id.
Here is the call graph for this function:
Defines a variable set that is the first input, but without the elements in the second parameter. To determine if two variable set elements are the same we take into account bot the variable index and its power.
Definition at line 206 of file variable_set.c. References AddVariableInt(), CopyVarSet(), DeleteVarSet(), Included(), InitVarSet(), Tvariable_set::nvars, Tvariable_set::power, and Tvariable_set::var_id.
Here is the call graph for this function:
Produces a variable set that is the union of two variable sets: i.e., it includes the variables in both sets.
Definition at line 228 of file variable_set.c. References AddVariableInt(), CopyVarSet(), DeleteVarSet(), FALSE, Tvariable_set::nvars, Tvariable_set::power, TRUE, and Tvariable_set::var_id. Referenced by AddMonomial(), and VarScaleEquation().
Here is the call graph for this function:
Here is the caller graph for this function:
Adds a variable index with a given power to a variable set.
Definition at line 266 of file variable_set.c. References AddVariableInt(), FALSE, Tvariable_set::power, and Tvariable_set::var_id. Referenced by AddVariable2Monomial(), and ReplaceVariableInMonomial().
Here is the call graph for this function:
Here is the caller graph for this function:
Removes a variable index from a variable set.
Definition at line 284 of file variable_set.c. References FALSE, Tvariable_set::nvars, Tvariable_set::power, and Tvariable_set::var_id. Referenced by FixVariableInMonomial(), and ReplaceVariableInMonomial().
Here is the caller graph for this function:
Returns the order of a variable set: the sum of the powers of the variables in the set.
Definition at line 306 of file variable_set.c. References Tvariable_set::nvars, and Tvariable_set::power. Referenced by MonomialOrder().
Here is the caller graph for this function:
Returns the number of elements of a variable set.
Definition at line 325 of file variable_set.c. References Tvariable_set::nvars. Referenced by BilinearMonomial(), CropEquation(), CtMonomial(), DummifyAndAddEquation(), EvaluateMonomial(), EvaluateMonomialInt(), GetBoxMaxSizeVarSet(), GetBoxMinSizeVarSet(), GetEquationNumVariables(), IsSimplificable(), LinearMonomial(), QuadraticMonomial(), ReplaceVariableInEquation(), RewriteEquation(), and SetEquationInfo().
Here is the caller graph for this function:
Returns the identifier for the n-th variable in the set. If the set has less than n elements this functions triggers an error.
Definition at line 330 of file variable_set.c. References Error(), and Tvariable_set::var_id. Referenced by CropEquation(), DummifyAndAddEquation(), ErrorDueToVariable(), GetBoxMaxSizeVarSet(), GetBoxMinSizeVarSet(), GetFirstOrderApproximationToEquation(), IsSimplificable(), LinearEquation2LinearConstraint(), LinearizeCircleEquation(), LinearizeGeneralEquation(), LinearizeParabolaEquation(), LinearizeSaddleEquation(), LinearizeSphereEquation(), RewriteEquation(), SetEquationInfo(), and UpdateSplitWeight().
Here is the call graph for this function:
Here is the caller graph for this function:
Returns the variable identifiers stored in a variable set.
Definition at line 341 of file variable_set.c. References Tvariable_set::var_id.
Returns the power for the n-th variable in the set. If the set has less than n elements this functions triggers an error.
Definition at line 346 of file variable_set.c. References Error(), and Tvariable_set::power. Referenced by BilinearMonomial(), DummifyAndAddEquation(), FixVariableInMonomial(), LinearMonomial(), QuadraticMonomial(), ReplaceVariableInEquation(), and ReplaceVariableInMonomial().
Here is the call graph for this function:
Here is the caller graph for this function:
Returns the variable powers stored in a variable set.
Definition at line 357 of file variable_set.c. References Tvariable_set::power.
Evaluates a variable set for a given set of value for the variables.
Definition at line 362 of file variable_set.c. References Error(), Tvariable_set::nvars, Tvariable_set::power, and Tvariable_set::var_id. Referenced by EvaluateMonomial().
Here is the call graph for this function:
Here is the caller graph for this function:
Evaluates a variable set for a given set of ranges for the variables using interval arithmetics.
Definition at line 382 of file variable_set.c. References Error(), IntervalPow(), IntervalProduct(), NewInterval(), Tvariable_set::nvars, Tvariable_set::power, and Tvariable_set::var_id. Referenced by EvaluateMonomialInt().
Here is the call graph for this function:
Here is the caller graph for this function:
Derives a variable set with respect to a given variable.
Definition at line 403 of file variable_set.c. References Tvariable_set::maxvars, NEW, Tvariable_set::nvars, Tvariable_set::power, and Tvariable_set::var_id. Referenced by DeriveMonomial().
Here is the caller graph for this function:
Writes a variable set to a given stream.
Definition at line 436 of file variable_set.c. References Tvariable_set::nvars, Tvariable_set::power, PRINT_VARIABLE_NAME, and Tvariable_set::var_id. Referenced by PrintMonomial().
Here is the caller graph for this function:
Deletes the information stored in the variable set and frees the allocated memory space.
Definition at line 462 of file variable_set.c. References Tvariable_set::power, and Tvariable_set::var_id. Referenced by DeleteEquation(), DeleteMonomial(), SubstractVarSet(), and UnionVarSet().
Here is the caller graph for this function:
|