TVecByte Class

Header: Dew.Math/MtxVecInt.h · Cross-compiler
tObjectTMtxVecBaseTMtxVecIntTAbstractMtxVecIntTVecIntTVecByte

class TVecByte : public TVecInt;

Class for 8bit one dimensional integer arrays.

Class for accessing and manipulating 8bit one dimensional arrays. It handles memory allocation and basic vector arithmetics.

Constructors

NameDescription
TVecByte (2)

Properties

NameTypeDescription
ActualSizelong longFor internal use only. Read to get the amount of memory allocated in number of doubles (8byte packs).
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 vector.
CacheIndexintFor internal use only. Read to get the index of this object in object cache.
Capacitylong longSizing the object will not allocate less than Capacity.
CapacityInByteslong longSizing the object will not allocate less than CapacityInBytes.
CapacityInElementslong longSizing the object will not allocate less than CapacityInElements.
CapacityStepdoubleSpecifies increment step for the Capacity property.
CaptionDewStringCaption.
ConditionCheckboolEnables/disable inline condition checking.
FirstintFirst element in object Values array.
IntegerValuesDewStringReturns content as a string suitable for display as a tooltip.
IntPrecisionTIntPrecisionDefines internal storage precision which can be either 32, 16 or 8 bit.
IntPrecisionLockboolPrevents change to IntPrecision if Lock = True.
IsDoubleboolDefines the precision (single or double) of the floating point operations.
IsSubRangeboolSet to true after the SetSubIndex or SetSubRange call.
LastintLast element in object Values array.
LengthintDefines the length in number of samples.
MtxVecTypeTMtxVecType
OnSetSizeTMtxNotifyEventCalled when object size changes.
PoolIndexintInternal.
ScaleFactorintSpecifies the power of two for the scale factor used by some methods.
TagintStores an integer value as part of a TMtxVec object.

Methods

NameDescription
Abs (4)Absolute values.
Add (12)Add coresponding elements in Src2 to Src1.
AddAndMul (26)Compute (X + Y)*Z
AddRef
AddScaled (10)Compute X + Y*yScale
AddScaledC (4)Compute X + Y*yScale + zScalar
AddScaledSqr (4)Compute sqr(X + Y*yScale)
Adopt
Assign
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.
Bits
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 unpacked bit storage.
BlockFinishDeinitializes block processing before the final block is processed.
BlockInit (4)Initializes block processing.
BlockNextObtains the next subrange of the data.
BlockSubRangeLevelReturns the current subrange stack level used by block processing functions.
BValues
BValues1D
ClearSets size to 0 and releases associated memory.
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 (16)Copies values from the calling object to the Dst array and converts values to to 2 byte signed integer numbers.
CountInRange (2)Returns number of values within the interval.
CreateCached
CumSum (4)Cumulative sum.
DataIndex (2)
DefaultArray
DiagCopies the k-th diagonal from the TMtxInt object.
Difference (3)Difference.
DisableSelectPrevents calls to TVecByte::Select.
DisableSubrangePrevents calls to TVecByte::SetSubRange.
Disown (2)
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 Src1 with Src2.
DivideBy (4)Divide Value with calling vector elements.
DivideC (2)Compute X / (Y*zScale)
EnableSelectEnables calls to TVecByte::Select.
EnableSubrangeEnables calls to TVecByte::SetSubRange.
Find (2)Finds a match for X in object values.
FindAndGather (2)The b parameter is of integer type.
FindIndexes (2)Finds matching indexes. The b parameter is of integer type.
FindIndexesAndLength (2)Finds matching indexes and returns their count. The b parameter is of integer type.
FindMask (4)Finds a vector mask.
FreeCached
FreeToCacheReleases this object back to cache.
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_Bits
get_BValues
get_BValues1D
get_DefaultArray
get_IValues
get_IValues1D
get_SValues
get_SValues1D
GetCapacity
GetCapacityInElements
GetCol (3)Copies a column from matrix.
GetObjectToByteArrayCopies object to an array of bytes.
GetRow (3)Copies a row from matrix.
GroupCountCounts groups of equal numbers within Bins.
GroupCountIterationCounts groups of equal numbers within Bins.
IsEqual (4)Compares Value with all calling object elements.
IValues
IValues1D
LoadFromFileReads the header information and the values array content from the file.
LoadFromStreamLoad the list from a stream.
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 (6)Applies median filter with size Mask to the calling vector elements [Index.. Index+Len-1].
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 8bit unsigned integer value of the vector at Index.
PIValuesObtains a pointer to the 32bit signed integer value of the vector at Index.
PSValuesObtains a pointer to the 16bit signed 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 elements [Index]..[Index+Len-1].
RandomRampFills the calling vector elements with linear rule and randomly shuffles the indexes.
RandomShuffleRandomly shuffles the content of the vector.
ReadHeader
ReadValuesRead values content from stream to object.
Release
RemDiv (6)Divide all Src elements with Value elements and store result of division in the calling object and reminder in RemDst.
Reset
Resize (2)Resizes vector size while preserving values.
Reverse (4)Reverse vector elements.
Rotate (4)A cyclic shift on vector elements in range.
SaveToFileWrite object header and values to a file.
SaveToStreamSave the list to a stream.
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 (2)Selects a set of elements from the vector.
SelectAllResets any defined selection.
set_Bits
set_BValues
set_BValues1D
set_DefaultArray (2)
set_IValues
set_IValues1D
set_SValues
set_SValues1D
SetCapacity
SetCapacityInElements
SetFullRangeResets subrange defined with SetSubRange.
SetFullRangeLevelPops the current subrange stack one level up.
SetInteger
SetIntPrecision
SetIt (2)Sets object values.
SetLength
SetObjectFromByteArrayReads the properties of the object from the array of bytes.
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 all calling object elements [Index]..[Index+Len-1] to Value.
SetZero (2)Set all calling vector elements to zero.
Shift (4)Perform a shift on vector elements in range.
Size (3)Sets the size and storage precision of the calling object.
SizeFromArray (6)Sets the size of the vector to match an array.
SizeToArray (8)Sizes the array.
SortAscend (4)Sort calling vector elements [Index..Index+Len-1] in ascending order in-place.
SortDescend (4)Sort calling vector elements [Index..Index+Len-1] in descending order in-place.
SqrAddScaled (4)Compute sqr(X) + sqr(Y)*yScale
StringsToValues (4)Convert strings in srcList to integers.
Sub (4)Compute X - Y - Z
SubAndMul (26)Compute (X - Y)*Z
SubRangeLevelReturns the current subrange stack level.
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
SValues1D
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.
ToolTip
ToStringReturns content as a string.
ValidateCplxArrayIndexes
ValidateParams (4)
ValidateParams2
ValidateRealArrayIndexes
Values
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.
WriteHeader
WriteValues

Operators

NameDescription
operator!= (6)Returns true, if Left and Right do not have equal Length and Values.
operator& (2)Computes bitwise "and" between Left and right.
operator* (2)Multiply all elements in Left with corresponding elements in Right.
operator+ (2)Add coresponding elements in Left and Right.
operator- (2)Subtract coresponding elements in Right from Left.
operator/ (2)Divide all elements in Left with coresponding elements in Right.
operator== (6)Returns true, if Left and Right are of equal Length and Values.
operator[]
operator^ (2)Performs logical "xor" between Left and Right.
operator| (2)Computes bitwise "or" between Left and right.

Fields

NameTypeDescription
BDataDewArray<unsigned char>
FBDataOffsetint
FIDataOffsetint
fRefCountint
FSDataOffsetint
IDataDewArray<int>
SDataDewArray<short>
ThreadIDlong long