DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


CopyFrom1DArray (Vector)

Declaration:TVector.CopyFrom1DArray (Src: TDoubleArray; SrcElemLo, SrcElemHi, DestElem: integer): integer;
The method CopyFrom1DArray copies a part of the array Src to self.The range of elements which are to be copied is specified by the parameters SrcElemLo and SrcElemHi. The destination area is determined by the parameter DestElem. The source vector element addressed by SrcElemLo is copied to the destination element addressed by DestElem. All other elements (up to source vector address SrcElemHi ) are copied to the destination vector at increasing addresses. The copying process stops at the boundaries of the destination vector.

Hint 1: Setting both SrcElemLo and SrcElemHi to zero is a shortcut for copying the entire source array or source vector.

Hint 2: SrcElemLo needs not be smaller than SrcElemHi, since the method CopyFrom1DArray automatically corrects for exchanged boundaries.