<<<<<<<<<<<<<<<<<

abstract_vector(lymb) Library_Name abstract_vector(lymb)

NAME

abstract_vector - the class from which all vectors should subclass

DESCRIPTION

This is a dummy object that defines the methods and some of the instance variables a vector should have. Ideally any object which supports "vector" type access should subclass off of this object.

SUPERCLASS

object

INSTANCE VARIABLES

dimension is the number of elements, or components, in a vector.

from is the starting index in a vector used for assignment and arithmetic operations.

to is the ending index in a vector used for assignment and arithmetic operations.

stride is the increment between successive elements of the vector when performing most operations. The default is 1.

MESSAGES

dimension? Return the dimension of the vector.

end_of_message Reset "from" and "to" of the instance, i.e., set from=1 and to=dimension. End_of_message cannot be sent from a LYMB script. The parser normally sends this when it sees a ";". C programmers who manipulate vectors should be aware of this behavior.

@ argument Set "from" and "to" to the argument, valid until the next "end_of_message".

from: argument Set "from" index to the argument, valid until the next "end_of_message".

from? Return "from" index.

to: argument Set "to" index to the argument, valid until the next "end_of_message".

to? Return "to" index.

stride= Sets the stride for the vector. It defaults to 1, and can't be set below 1, or to greater than the dimension of the vector. The stride is always reset to 1 when an end_of_message message is received.

stride? Returns the vector's stride.

EXAMPLE

This is an abstract class and should not be instantiated.

SEE ALSO

arg_vector vector s_vector


Please send comments and suggestions to
consult@rpi.edu