Global Functions in the SimTK namespace | These are functions at the top level of the SimTK namespace, meaning that a function named funcName() is invoked as SimTK::funcName(), or just funcName() if there is a "using namespace SimTK;" statement in effect |
Bit-twiddling Functions | These functions perform highly optimized bit-twiddling operations on the built-in integral types, and sometimes on the representations of floating point types as well |
atMostOneBitIsSet() | AtMostOneBitIsSet(i) provides an extremely fast way to determine whether an integral type is either zero or consists of a single set bit |
exactlyOneBitIsSet() | ExactlyOneBitIsSet(i) provides a very fast way to determine whether an integral type has exactly one bit set |
signBit() | SignBit(i) provides a fast way to determine the value of the sign bit (as a bool) for integral and floating types |
Scalar Functions | These functions are overloaded to act on SimTK scalar types and C++ built-in types, including integral types when appropriate |
Elliptic integrals | Elliptic integrals arise occasionally in contexts relevant to us, particularly in geometric calculations involving ellipses or ellipsoids |
Smoothed step functions | Functions stepUp(), stepDown() and stepAny() provide smooth, S-shaped step functions that are useful for "softening" abrupt transitions between two values |
clamp(), clampInPlace() | Limit a numerical value so that it does not go outside a given range |
cube() | Y=cube(x) returns the cube of the argument for any numeric type, integral or floating point |
isFinite() | IsFinite(x) provides a reliable way to determine if x is a "normal" floating point number, meaning not a NaN or +/- Infinity |
isInf() | IsInf(x) provides a reliable way to determine if x is one of the two infinities (either negative or positive) |
isNaN() | IsNaN(x) provides a reliable way to determine if x is one of the "not a
number" floating point forms |
isNumericallyEqual() | IsNumericallyEqual(x,y) compares two scalar types using a tolerance (default or explicitly specified) and returns true if they are close enough |
sign() | S=sign(n) returns int -1,0,1 according to n<0, n==0, n>0 for any integer or real numeric type, unsigned 0 or 1 for any unsigned argument |
square() | Y=square(x) returns the square of the argument for any numeric type |
Spatial Algebra Utilities | These utility functions are used for manipulation of spatial quantities that are contained in SpatialVec or SpatialMat objects |
Timing Functions | These functions provide a convenient way to do high-precision timing, either for real time use or performance measurement, and to sleep for precise time intervals |
High-Resolution Elapsed Time Measurement and Sleep | These functions provide access to the system's high resolution interval timer, and highest precision sleep facility for unscheduling a thread until it is needed at a specific later time |
Measuring CPU Time | These functions provide measurement of CPU time consumed by a process or by individual threads |
Timespec/Nanosecond/Second Conversions | These inline functions provide a fast and convenient way for doing arithmetic with the ugly Posix timespec struct |
Utilities for De/serializing | These namespace-scope templatized utilities provide uniform serialization and deserialization behavior for built-in and SimTK-defined types |
readFormatted() | Namespace-scope utility method SimTK::readFormatted<T>() reads a value of type T from an input stream, recognizing a variety of formats such as the format produced by writeFormatted() or simpler unformatted data such as is produced by writeUnformatted() |
readUnformatted() | Namespace-scope utility function SimTK::readUnformatted<T>() reads the next whitespace-separated token(s) from a given stream and attempts to interpret them as a value of type T |
writeFormatted() | Namespace-scope utility method SimTK::writeFormatted<T>() writes a value of type T to an output stream in a mildly formatted way depending on the type of container represented by T |
writeUnformatted() | Namespace-scope utility method SimTK::writeUnformatted<T>() writes a value of type T to an output stream as a space-separated series of tokens with no brackets, commas, semicolons or other formatting characters |
Matrix Characteristics | Matrix characteristics are specifications of particular aspects of matrices: |
Predefined Constants | There are two kinds of numerical constants predefined by SimTK: (1) a set of typed, const, in-memory values in the SimTK namespace, at the default Real precision or with other specific types, and (2) a set of preprocessor (#define) macros containing extremely high-precision precalculated numerical values in long double precision |
Numerical Constants with Types | This is a set of predefined constants in the form of Real (SimTK default precision) symbols that are important for writing precision-independent numerical algorithms |
Preprocessor Macro Constants | These are preprocessor (#define) macros providing constants values at very high precision. See the discussion under the main Predefined Constants module heading |
Mathematical Constants | These are some common unitless numerical constants evaluated to 64 digits and written here in maximal (long double) precision |
Physical Constants | These constants are from the CODATA 2002 set from the NIST Physics Laboratory web site http://physics.nist.gov/constants (NIST SP 961 Dec 2005) |
Unit Conversion Factors | In each case here, given a value in the units mentioned first in the name, you should multiply by the given constant to produce the equivalent quantity measured in the units that appear second in the name |
SimTK Regression Testing | SimTK defines some utilities to facilitate the creation of regression tests for SimTK facilities |
Type-Safe Integer Indices | It is common to store objects or information about them in randomly-indexable arrays, and then to support maximum-performance selection by allowing the index to be used |