Vec_cd (struct)¶
The Vec_cd represents a dense vector.
/*
** Example: Vec_cd
*/
// create a 7-element vector
Vec_cd vec(7);
Methods¶
Vec_cd ( in Integer size ) | |
Vec_cd ( in Vec_cd that ) | |
Vec_cd () | |
Boolean | almostEqual ? ( in Vec_cd other ) |
Boolean | almostEqual ? ( in Vec_cd that, in Float64 precision ) |
appendDesc ? ( io String string ) | |
Vec_cd | clone ? () |
Complex_d | dot ? ( in Vec_cd that ) |
Boolean | equal ? ( in Vec_cd that ) |
Complex_d | get ? ( in Integer ind ) |
UInt32 | hash ? () |
Vec_cd | head ? ( in Integer n ) |
Complex_d | length ? () |
Complex_d | lengthSquared ? () |
Vec_cd | linearInterpolate ? ( in Vec_cd that, in Complex_d t ) |
normalize ! () | |
resize ! ( in Integer newSize ) | |
set ! ( in Integer ind, in Complex_d val ) | |
setAll ! ( in Complex_d val ) | |
setNull ! () | |
Complex_d | setUnit ! () |
Integer | size ? () |
String | sizeDesc ? () |
Vec_cd | sub ? ( in Integer s, in Integer e ) |
Vec_cd | unit ? () |
Integer | validateSize ? ( in Vec_cd that, in String desc ) |
Methods in detail¶
Vec_cd ( in Integer size )
Construct a vector with size
elements
Construct a vector from the vector that
Vec_cd ()
default constructor
Boolean Vec_cd.almostEqual? ( in Vec_cd other )
Returns true if this vector is almost the same as another one (using a default precision)
Boolean Vec_cd.almostEqual? ( in Vec_cd that, in Float64 precision )
Returns true if this vector is almost the same as another one (using a default precision)
Vec_cd.appendDesc? ( io String string )
Append a String description of this vector’s size and contents
to the io variable string
clone method
Complex_d Vec_cd.dot? ( in Vec_cd that )
Boolean Vec_cd.equal? ( in Vec_cd that )
Returns true if this vector is the same as another one
Complex_d Vec_cd.get? ( in Integer ind )
Get value of the vector element at the ind
position
Hash for this matrix
Vec_cd Vec_cd.head? ( in Integer n )
Return the length of the vector
Complex_d Vec_cd.lengthSquared? ()
Vec_cd Vec_cd.linearInterpolate? ( in Vec_cd that, in Complex_d t )
Linearly interpolates this vector with another one based on a scalar blend value (0.0 to 1.0)
Vec_cd.normalize! ()
Vec_cd.resize! ( in Integer newSize )
Change the number of elements in the vector to newSize
Vec_cd.set! ( in Integer ind, in Complex_d val )
Set the value of element ind
to val
Vec_cd.setAll! ( in Complex_d val )
Set the value of all vector elements to val
Vec_cd.setNull! ()
Set the value of all vector elements to zero
Sets this vector to its unit vector and returns its previous length
Integer Vec_cd.size? ()
Get the size of the vector
Return a String description of this vector and its size
Vec_cd Vec_cd.sub? ( in Integer s, in Integer e )
Returns the unit vector of this one, throws and exception if almost zero length
Integer Vec_cd.validateSize? ( in Vec_cd that, in String desc )
In Fabric guarded mode this method throws an exception if the size
of the current vector differs from the size of the that
vector