VectorInt Struct

Header: Dew.Math/MtxExprInt.h · Cross-compiler

struct VectorInt;

Integer vector class for operator overloading (Delphi 2006 and later).

Declare VectorInt instead of TVecInt to take advantage ofoperator overloading. Be carefull to declare VectorInt only for local variables with short lifetime. Call the Create method for VectorInt, if the variable is a global variable or a variable with a longer life. It also makes sense to continue to use TVecInt for global vars. If the Create method (constuctor) is not called, the VectorInt record obtains TVecInt object from object cache (fastest create). If the Create mehod is called, the TVecInt object is created in the usual way (slower). Object cache has limited size.

Constructors

NameDescription
VectorInt (14)Constructor of the record.

Destructors

NameDescription
~VectorInt

Properties

NameTypeDescription
BitCountlong longAllows sizing the internal storage to accomodate desired number of bits.
BlockEndboolReturns true, if the currrent subrange of the vector was also the last subrange in the VectorInt.
Capacitylong longSizing the object will not allocate less than Capacity samples.
CapacityStepdoubleSpecifies increment step for the Capacity property.
CaptionDewStringVector Caption.
ConditionCheckboolEnables/disable inline condition checking.
DataTVecInt*
FirstintFirst element in object Values array.
IntegerValuesDewStringReturns data for inspection by the debugger.
IntPrecisionTIntPrecisionDefines internal storage precision which can be either 32, 16 or 8 bit.
IsSubRangeboolSet to true after the SetSubIndex or SetSubRange call.
LastintLast element in object Values array.
LengthintDefines the length in number of samples.
ScaleFactorintSpecifies the power of two for the scale factor used by some methods.
TagintStores an integer value as a part of the object.

Methods

NameDescription
__Hold
__Retain
Abs (4)Absolute values.
Add (12)Add coresponding elements in Src2 to Src1.
AddAndMul (26)Compute (X + Y)*Z
AddScaled (10)Compute X + Y*yScale
AddScaledC (4)Compute X + Y*yScale + zScalar
AddScaledSqr (4)Compute sqr(X + Y*yScale)
AdoptAdopts TVecInt object.
Assign
AssignWithoutCopy
BinaryAnd (8)Apply binary "and" between coresponding elements in Src1 and Src2.
BinaryNot (4)Applies binary "not" operation to elements stored in the object.
BinaryOr (8)Apply binary "or" between coresponding elements in Src1 and Src2.
BinarySearch (4)Finds a match for X in object values using binary search.
BinaryXor (8)Apply binary "xor" between elements in the calling object and Value.
BitPack (2)Converts Src to packed bit storage.
BitShift (4)Apply binary shift by number of Bits to the left (positive) or right (negative) for all elements in the calling object.
BitShiftLeft (4)Apply binary shift by number of Bits to the left for all elements in the calling object.
BitShiftRight (4)Apply binary shift by number of Bits to the right for all elements in the calling object.
BitUnpack (2)Converts Src to packed bit storage.
BlockFinishDeinitializes block processing before the final block is processed.
BlockInit (4)Initializes block processing.
BlockNextObtains the next subrange of the data.
BValues
ClearSets vector size to zero.
Concat (2)Concatenates an array of TVecInt objects.
CondDisableSaves the current value of ConditionCheck property and sets it to false.
CondEnableSets the ConditionCheck property to whatever it was before the CondDisable was used.
Convert (2)Copy each of Vec elements to the calling object.
Copy (2)Copy object values.
CopyFromArray (14)Copies values from a real Src array.
CopyToArray (14)Copies values from the calling object to the Dst array and converts data to double precision numbers.
CountInRange (2)Returns number of values within the interval.
CreateFromCache
CumSum (4)Cumulative sum.
DiagCopies the k-th diagonal from the TMtxInt object.
Difference (3)Difference.
DisableSelectPrevents calls to VectorInt::Select.
DisableSubrangePrevents calls to VectorInt::SetSubRange.
Dispose
DistinctStores distinct values from Src in to Dst.
DivAndAdd (12)Compute X/Y + Z
DivAndSub (12)Compute X/Y - Z
Divide (12)Divides coresponding elements in Num with Den.
DivideBy (4)Divide Value with calling vector elements.
DivideC (2)Compute X / (Y*zScale)
EnableSelectEnables calls to VectorInt::Select.
EnableSubrangeEnables calls to VectorInt::SetSubRange.
Equals
Find (2)Finds a match for X in object values.
FindAndGather (2)The b parameter is of integer type.
FindAndSplit (3)Finds the masks for a vector and splits it.
FindIndexes (5)Fills the calling vector with indexes, where the logical expression is true.
FindIndexesAndLength (2)The b parameter is of integer type.
FindMask (5)Finds a vector mask.
GatherGather vector elements.
GatherByIncrGathers elements from X starting at Offset and with Increment to the calling object.
GatherByIndexGathers elements from X specified by indices stored in Indexes the calling object.
GatherByMaskGathers elements from X specified by non-zero values stored in the Mask to the calling object.
get_BValues
get_IValues
get_SValues
GetBits
GetCol (3)Copies a column from matrix.
GetHashCode
GetRow (3)Copies a row from matrix.
GetSelect
GetSelectIndex
IsEqual (4)Compares Value with all calling object elements.
IValues
LoadFromFileReads the header information and the values array content from the file.
LoadFromStream
LogicalNot (4)Applies logical "not" operation to elements stored in the object.
Max (4)Maximum value.
MaxEvery (4)Vectorised maximum.
MaxMin (2)Calculate minimum and maximum in one procedure call.
MaxMinIdx (2)Calculate minimum, maximum and their indices in one procedure call.
Median (4)Applies median filter with size Mask to the calling vector.
Min (4)Minimum value.
MinEvery (4)Vectorised minimum.
Mul (4)Compute X*Y*Z
MulAndAdd (14)Compute X*Y + Z
MulAndDiv (6)Compute X * Y / Z
MulAndSub (14)Compute X*Y - Z
Multiply (8)Multiplies coresponding elements in Src2 with Src1.
ParseParses string content as vector.
PBValuesObtains a pointer to the integer value of the vector at Index.
PIValuesObtains a pointer to the integer value of the vector at Index.
PSValuesObtains a pointer to the integer value of the vector at Index.
PValuesObtains a pointer to the integer value of the vector at Index.
Ramp (3)Fills the calling vector with a series following linear rule.
RandomRampFills the calling vector elements with linear rule and randomly shuffles the indexes.
RandomShuffleRandomly shuffles the content of the vector.
ReadHeaderReads the header information from a stream to object.
ReadValuesRead values content from stream to object.
RemDiv (6)Divide all Src elements with Value elements and store result of division in the calling object and reminder in RemDst.
Resize (2)Resizes vector size while preserving values.
Reverse (4)Reverse vector elements.
Rotate (4)A cyclic shift on all calling vector elements.
SaveToFileWrite object header and values to a file.
SaveToStream
ScatterScatter object elements.
ScatterByIncrScatters Src elements starting at Offset and with Increment to the calling object.
ScatterByIndexesScatters Src elements defined with indices stored in Indexes to the calling object.
ScatterByMaskScatters Src elements defined with the Mask to the calling object.
Select
SelectAllResets any defined selection.
set_BValues
set_IValues
set_SValues
SetBits
SetFullRangeResets any defined subrange.
SetFullRangeLevelResets last defined subrange and pops the subrange stack.
SetIt (2)Sets object values.
SetSelect
SetSelectIndex
SetSubIndex (2)Defines a subarray.
SetSubRange (4)Defines a sub vector/matrix.
SetSubRangeLevel (2)Defines a sub vector/matrix and pushes any previous subranges on to a stack.
SetVal (2)Set calling object element Index to Value.
SetZero (2)Set all calling vector elements to zero.
Shift (4)Do a shift on all calling vector elements.
Size (3)Sets the following properties
SizeFromArray (6)Sets the size of the vector to match an array.
SizeToArray (7)Sizes complex array.
SortAscend (4)Sort all calling vector elements in ascending order in-place.
SortDescend (4)Sort all calling vector elements in descending order in-place.
SqrAddScaled (4)Compute sqr(X) + sqr(Y)*yScale
StringsToValues (4)Convert strings in aList to integers.
Sub (4)Compute X - Y - Z
SubAndMul (26)Compute (X - Y)*Z
SubScaled (6)Compute X - Y*yScale - Z*zScale
SubScaledC (4)Compute X - Y*yScale - zScalar
Subtract (8)Subtract coresponding elements in Src2 from Src1.
SubtractFrom (4)Subtract all calling vector elements from integer Value.
Sum (2)Sums vector values.
SValues
ThreshAbsGT (4)Threshold top and bottom centered around zero.
ThreshAbsLT (4)Threshold top and bottom centered around zero.
ThreshBottom (4)Threshold bottom operation.
ThresholdGT_LT (4)Threshold greater than and less than operation.
ThreshTop (4)Threshold top operation.
ToStringReturns content as a string.
ValuesToStrings (4)Converts the content of the Values array of the calling vector to a list of strings.
ValuesToText (2)Convert all vector elements to text.
WriteHeaderWrites the header information for the calling vector to a stream.
WriteValuesWrites object Values content to a stream.

Operators

NameDescription
operator DewArray<double>Explicitely convert VectorInt to array of doubles.
operator DewArray<float>Explicitely convert VectorInt to array of doubles.
operator DewArray<int>Explicitely convert VectorInt to array of integer.
operator DewArray<short>Explicitely convert VectorInt to array of integer.
operator DewArray<unsigned char>Explicitely convert VectorInt to array of integer.
operator TVecInt *
operator!Performs logical (and bitwise) "not" on the Value.
operator!= (8)Returns true, if Left and Right are not equal.
operator& (3)Computes bitwise "and" between Left and right.
operator() (4)
operator* (5)Multiply all elements in Left with Right.
operator+ (5)Add left to all elements in Right and return result.
operator- (6)Subtract all elements in Right from Left.
operator->
operator/ (5)Divide all elements in Left with Right.
operator< (3)Returns true, if all elements of ALeft are smaller from ARight.
operator<<Performs bitwise left shift of aValue.
operator<= (3)Returns true, if all elements of ALeft are smaller or equal from ARight.
operator= (2)
operator== (8)Returns true, if Left and Right are of equal Length and Values.
operator> (3)Returns true, if all elements of ALeft are greater from ARight.
operator>= (3)Returns true, if all elements of ALeft are greater or equal from ARight.
operator>>Performs bitwise right shift of aValue.
operator[]
operator^ (3)Performs logical "xor" between Left and Right.
operator| (3)Computes bitwise "or" between Left and right.

Fields

NameTypeDescription
FDataTVecInt *