Vector

| HOME | BACK |

Overview

Vector is an object designed to use for a one dimensional array double precision floating data (8 bytes).  It is more convenient than a matrix in term of tracking number of elements, however less computation capability than a matrix.  A vector is empty when initiated, and it keeps tracking the number of elements in it whenever there is an insertion or deletion.

It is possible to convert between vector and matrix back and forth.

 

Member data

Name Data type Meaning
size int no of data in the vector
maxsize int no of maximum data can be stored in a vector

 

Operator

no operator provided

 

Construction function

{Vector} ret  =  VECTOR([{int} argm1])

argm1 = max no of data in the vector    (default = 1)

Example:

->v1 = Vector() create a vector with max size = 1

->v1 = Vector(200)

create a vector with max size = 200

 

Lfunction

object({int} argm1)   =  {double} left-value

argm1 = vector index

Example:

->v1(0) = 35 set value of the 1st element to 35

 

Class function

 ( )  EXTEND FIND HSORT  
INIT INT LAST LINGEN LOAD
 MATRIX MAX  MAXSIZE MEDIAN MIN
MPUSHBACK        
 PUSHBACK QFIND  REMALL REMOVE REMSORT
 REVERSE SAVE  SIZE SORT TRUNCATE
 UNSTACK WINDOW      

 


| HOME | BACK |