Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdStorage Class Reference

A class for storing an array of statevectors. More...

#include <rdStorage.h>

Inheritance diagram for rdStorage:

rdPtrArray rdObject List of all members.

Public Member Functions

 rdStorage (int aCapacity=rdStorage_DEFAULT_CAPACITY, const char *aName="UNKNOWN")
 Default constructor.

 rdStorage (const char *aFileName)
 Construct an rdStorage instance from file.

 rdStorage (const rdStorage &aStorage, bool aCopyData=true)
 Copy constructor.

 rdStorage (const rdStorage &aStorage, int aStateIndex, int aN, const char *aDelimiter="\t")
 Construct a copy of a specified storage taking only a subset of the states.

virtual ~rdStorage ()
 Destructor.

void setWriteSIMMHeader (bool aTrueFalse)
 Set the whether or not to write a header appropriate for a SIMM motion file.

bool getWriteSIMMHeader () const
 Get the whether or not to write a header appropriate for a SIMM motion file.

void setHeaderToken (const char *aToken)
 Set the header token.

const char * getHeaderToken () const
 Get the header token of this storage.

void setColumnLabels (const char *aLabels=NULL)
 Set a labels string for the columns in this rdStorage instance.

const char * getColumnLabels () const
 Get column labels string.

void setStepInterval (int aStepInterval)
 Set the step interval.

int getStepInterval () const
 Get the step interval.

int getSmallestNumberOfStates ()
 Get the smallest number of states.

rdStateVectorgetStateVector (int aTimeIndex) const
 Get the rdStateVector at a spcified time index.

rdStateVectorgetLastStateVector () const
 Get the last states stored.

double getFirstTime ()
 Get the time of the first stored states.

double getLastTime ()
 Get the time of the last states.

int getTime (int aTimeIndex, double &rTime, int aStateIndex=-1) const
 Get the time at a specified time index for a specified state.

int getTimeColumn (double *&rTimes, int aStateIndex=-1)
 Get the times for a specified state.

int getData (int aTimeIndex, int aStateIndex, double &rValue) const
 Get a data value of a specified state at a specified time index.

int getData (int aTimeIndex, int aStateIndex, int aN, double *rData) const
 At a specified time index, get a number of state values starting at a specified state.

int getData (int aTimeIndex, int aN, double **rData) const
 Get the first aN states at a specified time index.

int getData (int aTimeIndex, int aN, double *rData) const
 Get the first aN states at a specified time index.

int getData (double aTime, int aN, double **rData)
 Get the first aN states at a specified time.

int getData (double aTime, int aN, double *rData)
 Get the first aN states at a specified time.

int getDataColumn (int aStateIndex, double *&rData) const
 Get the data corresponding to a specified state.

void resetStorage (double aT)
 Reset the storage to start storing at the index which occurs at or just prior to time aT.

virtual int append (void *aVec)
 Append a copy of an rdStateVector.

virtual int append (rdPtrArray *aArray)
 Append copies of all state vectors in an rdStorage object.

virtual int append (double aT, int aN, double *aY)
 Append an array of data that occured at a specified time.

virtual int store (int aStep, double aT, int aN, double *aY)
 Store a simulation vector.

void shiftTime (double aValue)
 Shift the times of all state vectors.

void scaleTime (double aValue)
 Scale the times of all state vectors.

void add (double aValue)
 Add a value to all state vectors in this storage instance.

void add (int aN, double aY[])
 Add an array to all state vectors in this storage instance.

void add (rdStateVector *aStateVector)
 Add a state vector to the all state vectors in this storage instance.

void add (rdStorage *aStorage)
 Add a storage instance to this storage instance.

void subtract (double aValue)
 Subtract a value from all state vectors in this storage instance.

void subtract (int aN, double aY[])
 Subtract an array from all state vectors in this storage instance.

void subtract (rdStateVector *aStateVector)
 Subtract a state vector from all state vectors in this storage instance.

void subtract (rdStorage *aStorage)
 Subtract a storage instance to this storage instance.

void multiply (double aValue)
 Multiply all state vectors in this storage instance by a value.

void multiply (int aN, double aY[])
 Multiply all state vectors in this storage instance by an array.

void multiply (rdStateVector *aStateVector)
 Multiply all state vectors in this storage instance by a state vector.

void multiply (rdStorage *aStorage)
 Multipy this storage instance by a storage instance.

void divide (double aValue)
 Divide all state vectors in this storage instance by a value.

void divide (int aN, double aY[])
 Divide all state vectors in this storage instance by an array.

void divide (rdStateVector *aStateVector)
 Divide all state vectors in this storage instance by a state vector.

void divide (rdStorage *aStorage)
 Divide this storage instance by a storage instance.

rdStorage * integrate (int aI1=-2, int aI2=-1)
 Integrate the state vectors between aI1 and aI2.

rdStorage * integrate (double aT1, double aT2)
 Integrate the state vectors between times aTI and aTF.

int computeArea (int aN, double *aArea)
 Compute the area of the first aN states stored for all state vectors stored in this storage instance.

int computeArea (double aTI, double aTF, int aN, double *aArea)
 Compute the area of the first aN states stored between the times aTI and aTF.

int computeAverage (int aN, double *aAve)
 Compute the average value of the first aN states stored for all state vectors stored in this storage instance.

int computeAverage (double aTI, double aTF, int aN, double *aAve)
 Compute the average value of the first aN states stored between the times aTI and aTF.

int findIndex (double aT)
 Find the index of the storage element that occured immediately before or at a specified time ( aT <= getTime(index) ).

int findIndex (int aI, double aT)
 Find the index of the storage element that occured immediately before or at time aT ( aT <= getTime(index) ).

void print ()
 Print the contents of this storage instance to standard output.

int print (const char *aFileName, const char *aMode="w")
 Print the contents of this storage instance to a file.

int print (const char *aFileName, double aDT, const char *aMode="w")
 Print the contents of this storage instance to a file named by the argument aFileaName using uniform time spacing.


Static Public Attributes

const double LARGE_NEGATIVE = -1.0e-30
 Large negative number.

const double LARGE_POSITIVE = 1.0e-30
 Large positive number.

const char * DEFAULT_HEADER_TOKEN = "endheader"
 Default token used to mark the end of the storage description in a file.


Protected Attributes

char _headerToken [rdObject_NAME_LENGTH]
 Token used to mark the end of the description in a file.

char * _columnLabels
 Column labels for the states, usually tab delimited.

int _stepInterval
 Step interval at which states in a simulation are stored.

int _lastI
 Last index at which a search was started.

bool _writeSIMMHeader
 Flag for whether or not to insert a SIMM style header.


Private Member Functions

void allocateCapacity ()
void setNull ()
 Set all states to their null or default values.

void copyData (const rdStorage &aStorage)
 Copy the data stored by another storage instance.

int writeHeader (FILE *rFP, double aDT=-1)
 Write the header.

int writeSIMMHeader (FILE *rFP, double aDT=-1)
 Write a header appropriate for SIMM motion files.

int writeDescription (FILE *rFP)
 Write the description.

int writeColumnLabels (FILE *rFP)
 Write the column labels.

int writeDefaultColumnLabels (FILE *rFP)
 Write default column labels.


Detailed Description

A class for storing an array of statevectors.

A statevector is an array of data that has an associated time stamp (see rdStateVector). Generally, it is used to store the time histories of the states during an integration, but may be used for a variety of applications. Note that it is assumed by several methods in this class that the time stamps of stored statevectors are monotonically increasing.

When stored as a file, the statevectors are stored in rows. This first value in a row is the time stamp at which the states occured. The rest of the elements in a row are the states. Therefore, each column of data in a file corresponds to a particular state.

In an rdStorage object, statevectors (or rows) are indexed by the TimeIndex, and a particular state (or column) is indexed by the StateIndex.

Version:
1.0
Author:
Frank C. Anderson


Constructor & Destructor Documentation

rdStorage::rdStorage const char *  aFileName  ) 
 

Construct an rdStorage instance from file.

This constructor is far from bullet proof.

Parameters:
aFileName Name of the file from which the rdStorage is to be constructed.

rdStorage::rdStorage const rdStorage &  aStorage,
int  aStateIndex,
int  aN,
const char *  aDelimiter = "\t"
 

Construct a copy of a specified storage taking only a subset of the states.

Parameters:
aStorage Storage to be copied.
aStateIndex Index of the state (column) at which to start the copy.
aN Number of states to copy.
aDelimiter Delimiter used to separate state labels (i.e., column labels). The delimiter is assumed to be a tab by default.

rdStorage::~rdStorage  )  [virtual]
 

Destructor.

The stored rdStateVectors are deleted during destruction.


Member Function Documentation

void rdStorage::add rdStorage *  aStorage  ) 
 

Add a storage instance to this storage instance.

Linear interpolation or extrapolation is used to get the values of the states that correspond in time to the states held in this storage instance.

Parameters:
aStorage Storage to add to this storage. s

void rdStorage::add rdStateVector aStateVector  ) 
 

Add a state vector to the all state vectors in this storage instance.

Parameters:
aStateVector State vector to add to the state vectors.
See also:
rdStateVector::add(int,double[])

void rdStorage::add int  aN,
double  aY[]
 

Add an array to all state vectors in this storage instance.

Only the first aN states of each state vector are altered.

Parameters:
aN Length of aY
aY Array of values to add to the state vectors.
See also:
rdStateVector::add(int,double[])

void rdStorage::add double  aValue  ) 
 

Add a value to all state vectors in this storage instance.

Parameters:
aValue Value to add to the state vectors.
See also:
rdStateVector::add(double)

int rdStorage::append double  aT,
int  aN,
double *  aY
[virtual]
 

Append an array of data that occured at a specified time.

Parameters:
aT Time stamp of the data.
aN Length of the array.
aY Array.
Returns:
Index of the first empty storage element.

int rdStorage::append rdPtrArray aArray  )  [virtual]
 

Append copies of all state vectors in an rdStorage object.

This method overrides rdArray::append(rdArray). Currently, there is no difference. The override is done for completeness.

Parameters:
aStorage Storage to be appended.
Returns:
The index of the first empty storage element.

Reimplemented from rdPtrArray.

int rdStorage::append void *  aVec  )  [virtual]
 

Append a copy of an rdStateVector.

This method overrides rdArray::append(void*). The difference is that the argument is assumed to an rdStateVector and a copy of the statevector is made before appending it.

Parameters:
aStateVector Statevector to be copied and appended.
Returns:
The index of the first empty storage element.

Reimplemented from rdPtrArray.

int rdStorage::computeArea double  aTI,
double  aTF,
int  aN,
double *  aArea
 

Compute the area of the first aN states stored between the times aTI and aTF.

It is assumed that there is enough memory at aArea to hold aN states. If aN exceeds the number of states held in storage, aN is disregarded.

The number of valid states in aArea is returned.

Note that if aTI and aTF do not fall exactly on the time stamp of a stored state, the states are linearly interpolated to provide an estimate of the state at aTI or at aTF.

int rdStorage::computeArea int  aN,
double *  aArea
 

Compute the area of the first aN states stored for all state vectors stored in this storage instance.

It is assumed that there is enough memory at aArea to hold aN states. If aN exceeds the number of states held in storage, aN is disregarded.

The number of valid states in aArea is returned.

int rdStorage::computeAverage double  aTI,
double  aTF,
int  aN,
double *  aAve
 

Compute the average value of the first aN states stored between the times aTI and aTF.

This method uses computeArea() to compute the area (integral) of each state on the interval [aTI,aTF] and then simply divides by the (aTF-aTI).

It is assumed that there is enough memory at aAve to hold aN states. If aN exceeds the number of states held in storage, aN is disregarded.

The number of valid states in aAve is returned.

Note that if aTI and aTF do not fall exactly on the time stamp of a stored state, the states are linearly interpolated to provide an estimate of the state at aTI or at aTF.

int rdStorage::computeAverage int  aN,
double *  aAve
 

Compute the average value of the first aN states stored for all state vectors stored in this storage instance.

This method uses computeArea() to compute the area (integral) and then simply divides by the the time interval (tf-ti).

It is assumed that there is enough memory at aAve to hold aN states. If aN exceeds the number of states held in storage, aN is disregarded.

The number of valid states in aAve is returned.

void rdStorage::copyData const rdStorage &  aStorage  )  [private]
 

Copy the data stored by another storage instance.

Note that this method only copies the stored data. It does not copy other members of aStorage such as the name and the description. To get a complete copy, the copy constructor should be used.

If this instance does not have enough capicity to hold the states of the specified storage (aStorage), the capacity is increased.

void rdStorage::divide rdStorage *  aStorage  ) 
 

Divide this storage instance by a storage instance.

Linear interpolation or extrapolation is used to get the values of the states that correspond in time to the states held in this storage instance.

Parameters:
aStorage Storage instance by which to divide. s

void rdStorage::divide rdStateVector aStateVector  ) 
 

Divide all state vectors in this storage instance by a state vector.

Parameters:
aStateVector State vector by which to divide the state vectors.

void rdStorage::divide int  aN,
double  aY[]
 

Divide all state vectors in this storage instance by an array.

Only the first aN states of each state vector are altered.

Parameters:
aN Length of aY
aY Array of values the states are to be divided by.

void rdStorage::divide double  aValue  ) 
 

Divide all state vectors in this storage instance by a value.

Parameters:
aValue Value by which to divide the state vectors.

int rdStorage::findIndex int  aI,
double  aT
 

Find the index of the storage element that occured immediately before or at time aT ( aT <= getTime(index) ).

This method can be much more efficient than findIndex(aT) if a good guess is made for aI. If aI corresponds to a state which occured later than aT, an exhaustive search is performed by calling findIndex(aT).

Parameters:
aI Index at which to start searching.
aT Time.
Returns:
Index preceding or at time aT. If aT is less than the earliest time, 0 is returned.

int rdStorage::findIndex double  aT  ) 
 

Find the index of the storage element that occured immediately before or at a specified time ( aT <= getTime(index) ).

This method is not very efficient because it always starts its search with the first stored state.

Parameters:
aT Time.
Returns:
Index preceding or at time aT. If aT is less than the earliest time, 0 is returned.

const char * rdStorage::getColumnLabels  )  const
 

Get column labels string.

Returns:
Character string of column labels.

int rdStorage::getData double  aTime,
int  aN,
double *  rData
 

Get the first aN states at a specified time.

The values of the states are determined by linear interpolation.

Parameters:
aT Time at which to get the states.
aN Number of states to get.
rData Array where the returned data will be set. The size of rData is assumed to be at least aN.
Returns:
Number of states that were set.

int rdStorage::getData double  aTime,
int  aN,
double **  rData
 

Get the first aN states at a specified time.

The values of the states are determined by linear interpolation.

Parameters:
aT Time at which to get the states.
aN Number of states to get.
rData Pointer to an array where the returned data will be set. The size of *rData is assumed to be at least aN. If rData comes in as NULL, memory is allocated.
Returns:
Number of states that were set.

int rdStorage::getData int  aTimeIndex,
int  aN,
double *  rData
const
 

Get the first aN states at a specified time index.

Parameters:
aTimeIndex Time index at which to get the states.
aN Number of states to get.
rData Array where the returned data will be set. The size of rData is assumed to be at least aN.
Returns:
Number of states that were set.

int rdStorage::getData int  aTimeIndex,
int  aN,
double **  rData
const
 

Get the first aN states at a specified time index.

Parameters:
aTimeIndex Time index at which to get the states.
aN Number of states to get.
rData Pointer to an array where the returned data will be set. The size of *rData is assumed to be at least aN. If rData comes in as NULL, memory is allocated.
Returns:
Number of states.

int rdStorage::getData int  aTimeIndex,
int  aStateIndex,
int  aN,
double *  rData
const
 

At a specified time index, get a number of state values starting at a specified state.

The method simply gets part of a row of data from adjacent columns in the storage object.

Parameters:
aTimeIndex Index that identifies the time (row) at which to get the data value: 0 <= aTimeIndex < getFirstEmpty().
aStateIndex Index of the state (column) at which to start getting the data.
aN Number of states (columns) to get.
rData Data values. rData should be able to hold at least N values.
Returns:
Number of states that were gotten.

int rdStorage::getData int  aTimeIndex,
int  aStateIndex,
double &  rValue
const
 

Get a data value of a specified state at a specified time index.

Parameters:
aTimeIndex Index that identifies the time (row) at which to get the data value: 0 <= aTimeIndex < getFirstEmpty().
aStateIndex Index of the state (column) for which to get the value.
rValue Value of the state.
Returns:
1 on success, 0 on failure.

int rdStorage::getDataColumn int  aStateIndex,
double *&  rData
const
 

Get the data corresponding to a specified state.

This call is equivalent to getting a column of data from the storage file.

Parameters:
aStateIndex Index of the state (column) for which to get the data.
rData Array containing the desired data. If rData is sent in as NULL, memory is allocated. However, if rData is sent in as a non-NULL, it is assumed that rData points to a memory block that is large enough to hold getFirstEmpty() doubles.
Returns:
Number of values set in rData. The number of values set may be less than getFirstEmpty() because not all stored state vectors are required to have the same number of states.

double rdStorage::getFirstTime  ) 
 

Get the time of the first stored states.

Returns:
Time of the first stored states. If there is no stored state, the constant rdMath::NAN (not a number) is returned.

const char * rdStorage::getHeaderToken  )  const
 

Get the header token of this storage.

Returns:
Header token.
See also:
setHeaderToken()

rdStateVector * rdStorage::getLastStateVector  )  const
 

Get the last states stored.

Returns:
Statevector. If no state vector is stored, NULL is returned.

double rdStorage::getLastTime  ) 
 

Get the time of the last states.

Returns:
Time of the first stored states. If there is no stored state, the constant rdMath::NAN (not a number) is returned.

int rdStorage::getSmallestNumberOfStates  ) 
 

Get the smallest number of states.

Ordinarily, the number of states is the same in each state vector; however, this is not required.

Returns:
Smallest number of states.

rdStateVector * rdStorage::getStateVector int  aTimeIndex  )  const
 

Get the rdStateVector at a spcified time index.

Parameters:
aTimeIndex Time index at which to get the state vector: 0 <= aTimeIndex < getFirstEmpty().
Returns:
Statevector. If no valid statevector exists at aTimeIndex, NULL is returned.

int rdStorage::getTime int  aTimeIndex,
double &  rTime,
int  aStateIndex = -1
const
 

Get the time at a specified time index for a specified state.

Parameters:
aTimeIndex Time index (row) for which to get the time.
rTime Time value.
aStateIndex Index of the state for which to get the time. By default, aStateIndex has a value of -1, which means disregard whether or not there is a valid state- just get the time at aTimeIndex. If aStateIndex is non-negative, the time is returned only if there is a valid state at aStateIndex.
Returns:
1 when the time was set, 0 when there was no valid state.

int rdStorage::getTimeColumn double *&  rTimes,
int  aStateIndex = -1
 

Get the times for a specified state.

Parameters:
rTime Array where times are set. If rTime is sent in as NULL, memory is allocated. If rTime is setn in as non-NULL, it is assumed that enough memory has been allocated at rTime to hold getFirstEmpty() doubles.
aStateIndex Index of the state for which to get the times. By default, aStateIndex has a value of -1, which means disregard whether or not there is a valid state- just get the times. If aStateIndex is non-negative, the time is set only if there is a valid state at aStateIndex.
Returns:
Number of times set. This can be less than getFirstEmpty() if a state does not exist for all or a subset of the stored statevectors.

bool rdStorage::getWriteSIMMHeader  )  const
 

Get the whether or not to write a header appropriate for a SIMM motion file.

Parameters:
aTrueFalse Whether (true) or not (false) to write a SIMM header.

rdStorage * rdStorage::integrate double  aT1,
double  aT2
 

Integrate the state vectors between times aTI and aTF.

The integration results are returned in an rdStorage instance that is a copy of this instance except the name has been appended with "_integrated" and, of course, the state vectors have been integrated. The caller is responsible for deleting the returned storage instance.

Note that if aTI and aTF do not fall exactly on the time stamp of a stored state, the states are linearly interpolated or extrapolated to provide an estimate of the state at aTI or at aTF.

Parameters:
aTI Time at which to start the integration.
aTF Time at which to stop the integration.
Returns:
Storage instance of integrated results. NULL is returned if an error is encountered.

rdStorage * rdStorage::integrate int  aI1 = -2,
int  aI2 = -1
 

Integrate the state vectors between aI1 and aI2.

The integration results are returned in an rdStorage instance that is a copy of this instance except the name has been appended with "_integrated" and, of course, the state vectors have been integrated. The caller is responsible for deleting the returned storage instance.

If aI1 is negative, integrations starts at the first rdStateVector held by this rdStorage instance. If aI2 is negative, integration starts at the last rdStateVector held by this rdStorage instance.

Note that aI1 and aI2 have negative default values, so that this method may be called without arguments to integrate all rdStateVectors held by this rdStorage instance.

Parameters:
aI1 Index of state vector at which to start integration.
aI2 Index of state vector at which to stop integration.
Returns:
Storage instance of integrated results. NULL is returned if an error is encountered.

void rdStorage::multiply rdStorage *  aStorage  ) 
 

Multipy this storage instance by a storage instance.

Linear interpolation or extrapolation is used to get the values of the states that correspond in time to the states held in this storage instance.

Parameters:
aStorage Storage instance by which to multiply. s

void rdStorage::multiply rdStateVector aStateVector  ) 
 

Multiply all state vectors in this storage instance by a state vector.

Parameters:
aStateVector State vector by which to multiply the state vectors.
See also:
rdStateVector::multiply(rdStateVector)

void rdStorage::multiply int  aN,
double  aY[]
 

Multiply all state vectors in this storage instance by an array.

Only the first aN states of each state vector are altered.

Parameters:
aN Length of aY
aY Array of values the states are to be multiplied by.
See also:
rdStateVector::multiply(int,double[])

void rdStorage::multiply double  aValue  ) 
 

Multiply all state vectors in this storage instance by a value.

Parameters:
aValue Value by which to mutiply the state vectors.
See also:
rdStateVector::multiply(double)

int rdStorage::print const char *  aFileName,
double  aDT,
const char *  aMode = "w"
 

Print the contents of this storage instance to a file named by the argument aFileaName using uniform time spacing.

The argument aMode specifies whether the file is openned for writting, "w", or appending, "a". If a bad value for aMode is sent in, the file is openned for writing.

The argument aDT specifies the time spacing.

The total number of characters written is returned. If an error occured, a negative number is returned.

int rdStorage::print const char *  aFileName,
const char *  aMode = "w"
 

Print the contents of this storage instance to a file.

The argument aMode specifies whether the file is openned for writting, "w", or appending, "a". If a bad value for aMode is sent in, the file is openned for writing.

The total number of characters written is returned. If an error occured, a negative number is returned.

Parameters:
aFileName Name of file to which to save.
aMode Writing mode: "w" means write and "a" means append. The default is "w".
Returns:

void rdStorage::scaleTime double  aValue  ) 
 

Scale the times of all state vectors.

Parameters:
aValue Value by which to scale the times.

void rdStorage::setColumnLabels const char *  aLabels = NULL  ) 
 

Set a labels string for the columns in this rdStorage instance.

A character string is used to label the columns. Each separate column label is usually delimited by a tab ("\t"), but any delimeter may be used.

The first column is almost always "Time." The other columns correspond to the separate elements of a state vector (rdStateVector).

If the labels string is set to NULL, the following default labels will be used when the rdStorage instance is saved to file:

time state_0 state_1 state_2 ...

Parameters:
aLabels Character string containing labels for the columns.

void rdStorage::setHeaderToken const char *  aToken  ) 
 

Set the header token.

The header token is used to mark the end of the header portion of an rdStorage when an rdStorage is saved in a file.

If the header token is NULL, a default header token is used.

Parameters:
aToken Header token.

void rdStorage::setWriteSIMMHeader bool  aTrueFalse  ) 
 

Set the whether or not to write a header appropriate for a SIMM motion file.

Parameters:
aTrueFalse Whether (true) or not (false) to write a SIMM header.

void rdStorage::shiftTime double  aValue  ) 
 

Shift the times of all state vectors.

Parameters:
aValue Value by which to shift the times.

int rdStorage::store int  aStep,
double  aT,
int  aN,
double *  aY
[virtual]
 

Store a simulation vector.

This method differs from append in that, if the integration step of a simulation is not a multiple of the step interval of this rdStorage class, the state is not appended. Note that if the step storage interval is 0, storage is turned off.

The first empty storage location is returned.

void rdStorage::subtract rdStorage *  aStorage  ) 
 

Subtract a storage instance to this storage instance.

Linear interpolation or extrapolation is used to get the values of the states that correspond in time to the states held in this storage instance.

Parameters:
aStorage Storage to subtract from this storage. s

void rdStorage::subtract rdStateVector aStateVector  ) 
 

Subtract a state vector from all state vectors in this storage instance.

Parameters:
aStateVector State vector to subtract from the state vectors.
See also:
rdStateVector::subtract(int,double[])

void rdStorage::subtract int  aN,
double  aY[]
 

Subtract an array from all state vectors in this storage instance.

Only the first aN states of each state vector are altered.

Parameters:
aN Length of aY
aY Array of values to subtract from the state vectors.
See also:
rdStateVector::subtract(int,double[])

void rdStorage::subtract double  aValue  ) 
 

Subtract a value from all state vectors in this storage instance.

Parameters:
aValue Value to subtract from the state vectors.
See also:
rdStateVector::subtract(double)

int rdStorage::writeColumnLabels FILE *  rFP  )  [private]
 

Write the column labels.

Parameters:
rFP File pointer.

int rdStorage::writeDefaultColumnLabels FILE *  rFP  )  [private]
 

Write default column labels.

Parameters:
rFP File pointer.

int rdStorage::writeSIMMHeader FILE *  rFP,
double  aDT = -1
[private]
 

Write a header appropriate for SIMM motion files.

Returns:
SIMM header.


Member Data Documentation

int rdStorage::_stepInterval [protected]
 

Step interval at which states in a simulation are stored.

See store().


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:13 2003 for Simulation Software by doxygen1.3