TaggedNumericData Class

Structure with 2 integer tags and optional arrays of integers, doubles, points, vectors, and geometry.

  • In typescript/javascript, all integer numbers that can be non-integer. Please do not insert non-integers in the integer array.

Methods

Name Description
constructor(tagA: number = 0, tagB: number = 0, intData?: number[], doubleData?: number[]): TaggedNumericData    
clone(result?: TaggedNumericData): TaggedNumericData Return a deep clone.  
getDoubleData(index: number, defaultValue: number): number get doubleData[index], or indicated default if the index is out of range  
isAlmostEqual(other: TaggedNumericData): boolean Apply isAlmostEqual to all members.  
pushIndexedDouble(intA: number, valueB: number): void push a pair of int values on the intData array.  
pushIntPair(intA: number, intB: number): void push a pair of int values on the intData array.  
tagToIndexedDouble(targetTag: number, minValue: number, maxValue: number, defaultValue: number): number Search pairs in the intData array for a pair (targetTag, index).  
tagToInt(targetTag: number, minValue: number, maxValue: number, defaultValue: number): number Search pairs in the intData array for a pair (targetTag, value).  
areAlmostEqual(dataA: undefined | TaggedNumericData, dataB: undefined | TaggedNumericData): boolean Static    

Properties

Name Type Description
doubleData undefined | number[] Double data with application-specific meaning  
intData undefined | number[] Integer data with application-specific meaning  
tagA number Application specific primary tag.  
tagB number Application specific secondary tag.  

Defined in

Last Updated: 30 November, 2023