These pages are auto-generated from self-documenting comments embedded in class files.
For more information on breve and steve, refer to the breve homepage.

Object : Vector

This class is included as part of the file Vector.tz.
To use this class in a simulation, include the line "@use Vector."

Class methods:


add-scalar value scalarValue (double)

Adds the number scalarValue to each element in the vector.


add-values of otherVector (object) scaled-by scale = 1.0 (double)

Adds this vector to otherVector leaving the result in otherVector. The matrices must be of the same size. The optional argument scale allows otherVector to be scaled before adding it to this vector.

This method is hardware accelerated where supported.


copy from otherVector (object)

Copies the contents of otherVector to thisVector.

This method is hardware accelerated where supported.


copy-to-blue-channel of-image theImage (Image object) with-scale scale = 1.0 (float)

Copies the contents of this vector to the blue channel of theImage. The optional argument scale specifies how the vector elements should be scaled.

This method, and it's counterparts copy-to-red-channel and copy-to-green-channel are far faster than looping manually through the vector values.


copy-to-green-channel of-image theImage (Image object) with-scale scale = 1.0 (float)

Copies the contents of this vector to the green channel of theImage. The optional argument scale specifies how the vector elements should be scaled.

This method, and it's counterparts copy-to-blue-channel and copy-to-red-channel are far faster than looping manually through the vector values.


copy-to-red-channel of-image theImage (Image object) with-scale scale = 1.0 (float)

Copies the contents of this vector to the red channel of theImage. The optional argument scale specifies how the vector elements should be scaled.

This method, and it's counterparts copy-to-green-channel and copy-to-blue-channel are far faster than looping manually through the vector values.


get-absolute-sum

Returns the sum of the absolute values of all elements in this vector.

This method is hardware accelerated where supported.


get-dimension

Returns the x size of this vector.


get-value at x (int)

Returns the vector value at position (x).


init-with size newDim (int)

Set the dimension of the vector to size. Clears contents.


multiply-with-values of otherVector (Vector object)

Multiplies each element in this vector with the corresponding element in otherVector. This is not regular vector multiplication; rather, it is a way to scale each element in otherVector.


print-matlab-style

Prints the vector in a style similar to MATLAB.


scale by scaleValue (float)

Scales all elements in the vector by scaleValue.

This method is hardware accelerated where supported.


set-all-values to value (float)

Sets all of the values in the vector to value.


set-size to newDim (int)

Sets the size of this vector to the new dimension.


set-value to value (double) at x (int)

Sets the vector value at position (x, y, z).


subtract-values of otherVector (object) scaled-by scale = 1.0 (double)

Subtracts this vector from this otherVector, leaving the result in otherVector. This method uses the same mechanism as add, but using a negative scale argument. The optional argument scale allows otherVector to be scaled before subtracting it from this vector.

This method is hardware accelerated where supported.


transform with-matrix transformation (Matrix2D object) with-result result (Vector object)

Transforms this Vector with the Matrix2D matrix, storing the output in result.


Documentation created Sun Oct 7 19:13:03 2007