SWIG code which must appear after the LAL headers.
Wrap the gsl_rng
class.
Construct a new gsl_rng
from another gsl_rng
.
Construct a new gsl_rng
from a generator name and random seed.
Destroy a gsl_rng
.
Properties and methods of a gsl_rng
, most of which map to gsl_rng_
...() functions.
Extend the LIGOTimeGPS
class.
Construct a new LIGOTimeGPS
from a real number.
Construct a new LIGOTimeGPS
from integer seconds and nanoseconds.
Construct a new LIGOTimeGPS
from a string
Operators are implemented by defining Python-style operator
methods (since LAL is C99, we don't have C++ operators available). Many SWIG language modules will automatically map these functions to scripting-language operations in their runtime code. In some cases (ironically, Python itself when using -builtin
!) additional directives are needed in the scripting-language-specific interface. Note that although C LIGOTimeGPS objects are naturally mutable, the SWIG version is exported as an immutable type to emulate other numeric types like floats and ints (we do not implement .__iadd__()
and other in-place operators). In Python this allows LIGOTimeGPS objects to be used as dictionary keys, just as other numbers can be.
Return new LIGOTimeGPS
which are the positive and negative values of $self
.
Return a new LIGOTimeGPS
which is the absolute value of $self
.
Return whether a LIGOTimeGPS
is non-zero.
Return integer representations of the LIGOTimeGPS
seconds.
Return a floating-point representation of a LIGOTimeGPS
.
Return a string representation of a LIGOTimeGPS
. Because XLALGPSToStr() allocates a new string using LAL memory, %newobject is used to make SWIG use a 'newfree' typemap, where the string is freed; SWIG will have already copied it to a native scripting-language string to return as output.
Return the hash value of a LIGOTimeGPS
.
Binary operators need only be implemented for two LIGOTimeGPS
arguments; the specialised input typemaps defined above will then allow other suitable types to be substituted as arguments. In some cases, however, we do implement special cases for some types to avoid loss of precision.
Return the addition of two LIGOTimeGPS
.
Return the subtraction of two LIGOTimeGPS
.
Return the multiplication of a LIGOTimeGPS
by a number or another LIGOTimeGPS
. A special typemap is needed for Python: since built-in types call the same function for both normal and reverse operators, so the function must support (LIGOTimeGPS, LIGOTimeGPS), (LIGOTimeGPS, double), and (double, LIGOTimeGPS) as inputs.
Return the floating-point division of a LIGOTimeGPS
by a number.
Return the integer division of two LIGOTimeGPS
.
Return the modulus of two LIGOTimeGPS
.
Comparison operators between two LIGOTimeGPS
are generated by the following SWIG macro. NAME is the name of the Python operator and OP is the C operator. The correct comparison NAME is obtained by comparing the result of XLALGPSCmp() against zero using OP.
Return the number of nanoseconds in a LIGOTimeGPS
.
Extend the LALUnit
class.
Construct a new LALUnit
class from a string.
Return whether a LALUnit
is non-zero, i.e. dimensionless.
Return integer representations of a LALUnit
.
Return a floating-point representation of a LALUnit
.
Return a string representation of a LALUnit
. Because XLALUnitToString() allocates a new string using LAL memory, %newobject is used to make SWIG use a 'newfree' typemap, where the string is freed; SWIG will have already copied it to a native scripting-language string to return as output.
Return the hash value of a LALUnit
.
Return the integer exponentiation of a LALUnit
.
Return the rational exponentiation of a LALUnit
.
Return the multiplication of two LALUnit
.
Return the division of two LALUnit
.
Comparison operators between two LALUnit
.
Return a normalised LALUnit
.