MatrixInt.Adopt Method

Overload List

#SignatureDescription
1void Adopt(TMtxInt Src)Adopts TMtxInt object.
2void Adopt(Int32[] aArray, Int32 aIndex, Int32 ARows, Int32 ACols)Adopts a pointer to one dimensional array.

Overload 1: void Adopt(TMtxInt Src)

Adopts TMtxInt object.

#NameTypeDescription
1SrcTMtxIntsource TMtxInt

Result: stored in self (calling object)

Remarks:

Src object will be adopted by MatrixInt. When the MatrixInt gets out of scope, the object will be freed.

Overload 2: void Adopt(Int32[] aArray, Int32 aIndex, Int32 ARows, Int32 ACols)

Adopts a pointer to one dimensional array.

#NameTypeDescription
1aArrayInt32[]
2aIndexInt32
3ARowsInt32
4AColsInt32

Result: stored in self (calling object)

Remarks:

Addopts a pointer to AArray array. The method sets the calling matrix Dew.Math.TMtxVecInt.IntPrecision property to IsComplex, Dew.Math.MatrixInt.Rows to ARows, Dew.Math.MatrixInt.Cols to ACols and Values1D and CValues1D to Pointer(AArray).

Note
You must call the Dew.Math.MatrixInt.Disown method, before you destroy the matrix. Use this method to save a copy operation. You should be very careful never to resize the calling matrix while it contains the adopted memory or call any routines that would require the matrix to reallocate the memory.

See Also: MatrixInt.Disown