#include <discinfo.hxx>


Public Member Functions | |
| void | add_discontinuity (double value, int order) |
| Adds a discontinuity to the list. | |
| const double * | all_discontinuities (int &n_discont, int order) |
| Returns a read-only array containing discontinuities up to and including the given order. | |
| discontinuity_info_rel | compare_with (const discontinuity_info &other, int to_order=3) const |
| Compares this list with another list. | |
| void | debug (char const *tline, FILE *fp) const |
| Outputs a title line and the details of this discontinuity_info to the specified file. | |
| const double * | discontinuities (int &n_discont, int order) const |
| Returns a read-only array containing discontinuities of a given order. | |
| discontinuity_info (const discontinuity_info &old) | |
| C++ copy constructor requests memory for this object. | |
| discontinuity_info () | |
| C++ allocation constructor requests memory for this object and initilizes data members. | |
| int | discontinuous_at (double t) const |
| Returns whether a discontinuity exists at the given parameter value. | |
| logical | is_empty () const |
| Returns TRUE if no discontinuity information is contained within the list. | |
| void | merge (discontinuity_info const &old) |
Merges two discontinuity_info lists, keeping the supplied one unchanged. | |
| void | negate () |
Negates the data for the discontinuity_info. | |
| discontinuity_info & | operator= (const discontinuity_info &old) |
| Transfers data from the given list to this list (assignment operator). | |
| double | period () const |
| Returns the period of the parameter values in the list. | |
| void | remove_discontinuity (double value) |
| Removes a discontinuity from the list. | |
| void | reparam (double a, double b) |
| Reparameterizes the discontinuities within this list. | |
| void | reset () |
| Deletes discontinuity information and reinitializes the data fields to zero. | |
| void | restore () |
Restores discontinuity_info data from a SAT file. | |
| void | save () const |
Saves discontinuity_info data to a SAT file. | |
| void | set_periodic (double per) |
| Sets the period of the parameter values in the list. | |
| void | shift (double incr) |
| Shifts the parameter value of each discontinuity by a given amount. | |
| discontinuity_info | split (double param) |
| Splits the list into two list at a given parameter value. | |
| ~discontinuity_info () | |
C++ destructor for discontinuity_info which deallocates memory. | |
Role: Used to store parameter values at which a curve or surface has a discontinuity in some derivative.
This class stores discontinuity information for a curve or surface. Only G1, G2, and G3 discontinuities are stored because we are not interested in higher ordered discontinuities. Externally this class can be viewed as an ordered list containing discontinuities, each of which contains a parameter value and the order of the discontinuity.
| discontinuity_info::discontinuity_info | ( | ) |
C++ allocation constructor requests memory for this object and initilizes data members.
Role: The allocation constructor is used primarily by the restore mechanism.
| discontinuity_info::discontinuity_info | ( | const discontinuity_info & | old | ) |
C++ copy constructor requests memory for this object.
Role: Allocates memory for the object and populates it with the data from the object supplied as an argument.
| old | instance to copy. |
| discontinuity_info::~discontinuity_info | ( | ) |
C++ destructor for discontinuity_info which deallocates memory.
| void discontinuity_info::add_discontinuity | ( | double | value, | |
| int | order | |||
| ) |
Adds a discontinuity to the list.
Role: Adds a discontinuity of the given order at the given parameter value. In periodic cases, it's up to the calling function to ensure that the parameter values are in the same parameter period.
| value | parameter value of discontinuity. | |
| order | order of discontinuity. |
| const double* discontinuity_info::all_discontinuities | ( | int & | n_discont, | |
| int | order | |||
| ) |
Returns a read-only array containing discontinuities up to and including the given order.
| n_discont | number of discontinuities in the returned array. | |
| order | order of discontinuity. |
| discontinuity_info_rel discontinuity_info::compare_with | ( | const discontinuity_info & | other, | |
| int | to_order = 3 | |||
| ) | const |
Compares this list with another list.
Role: This function returns the relationship between this discontinuity_info and a given discontinuity_info, considering discontinuities up to and including the given order present in this discontinuity_info.
| other | Instance to test against. | |
| to_order | Maximum order of discontinuities to test. Allowed values are {1,2,3}, default is 3. |
| void discontinuity_info::debug | ( | char const * | tline, | |
| FILE * | fp | |||
| ) | const |
Outputs a title line and the details of this discontinuity_info to the specified file.
| tline | title line. | |
| fp | file pointer. |
| const double* discontinuity_info::discontinuities | ( | int & | n_discont, | |
| int | order | |||
| ) | const |
Returns a read-only array containing discontinuities of a given order.
| n_discont | number of discontinuities in the returned array. | |
| order | order of disccontinuity. |
| int discontinuity_info::discontinuous_at | ( | double | t | ) | const |
Returns whether a discontinuity exists at the given parameter value.
Role: If there is a discontinuity at the given parameter value, returns the order of the discontinuity. Otherwise, returns 0.
| t | parameter value at which to test. |
| logical discontinuity_info::is_empty | ( | ) | const |
Returns TRUE if no discontinuity information is contained within the list.
| void discontinuity_info::merge | ( | discontinuity_info const & | old | ) |
Merges two discontinuity_info lists, keeping the supplied one unchanged.
Role: The entries from the given list are added into this list.
| old | instance to merge. |
| void discontinuity_info::negate | ( | ) |
Negates the data for the discontinuity_info.
Role: The entries in this list are reordered, and their parameter values are negated.
| discontinuity_info& discontinuity_info::operator= | ( | const discontinuity_info & | old | ) |
Transfers data from the given list to this list (assignment operator).
| old | the given list. |
| double discontinuity_info::period | ( | ) | const [inline] |
Returns the period of the parameter values in the list.
| void discontinuity_info::remove_discontinuity | ( | double | value | ) |
Removes a discontinuity from the list.
| value | parameter value at which to remove the discontinuity. |
| void discontinuity_info::reparam | ( | double | a, | |
| double | b | |||
| ) |
Reparameterizes the discontinuities within this list.
Role: Makes a linear change of parameter to all the discontinuity values (new value = a * old_value + b).
| a | scale factor. | |
| b | offset. |
| void discontinuity_info::reset | ( | ) |
Deletes discontinuity information and reinitializes the data fields to zero.
| void discontinuity_info::restore | ( | ) |
Restores discontinuity_info data from a SAT file.
Role: This method is never called directly. It is called by a higher hierarchical function if an item in the SAT file is determined to be of this class type. An instance of this class will already have been created through the allocation constructor. This method then populates the class instance with the appropriate data from the SAT file.
| void discontinuity_info::save | ( | ) | const |
Saves discontinuity_info data to a SAT file.
Role: This method is never called directly. It is called by a higher hierarchical function if an item in the SAT file is determined to be of this class type while storing information to a save file.
| void discontinuity_info::set_periodic | ( | double | per | ) | [inline] |
Sets the period of the parameter values in the list.
| per | specified period. |
| void discontinuity_info::shift | ( | double | incr | ) |
Shifts the parameter value of each discontinuity by a given amount.
| incr | amount to shift. |
| discontinuity_info discontinuity_info::split | ( | double | param | ) |
Splits the list into two list at a given parameter value.
Role: Like curve::split, the return value contains the initial values (before the split parameter), and the original discontinuity_info contains the others (after the split parameter). If the split parameter is itself a discontinuity, it is removed from the list.
| param | parameter value at which to split the list. |