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