@univerjs-pro/engine-formula v0.5.4


Class: ArrayValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:104

Extends

Constructors

new ArrayValueObject()

new ArrayValueObject(rawValue): ArrayValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:164

Parameters

ParameterType
rawValuestring | IArrayValueObject

Returns

ArrayValueObject

Overrides

BaseValueObject.constructor

Properties

PropertyTypeDefault valueInherited fromDefined in
patternstring''BaseValueObject.patternsubmodules/univer/packages/engine-formula/src/basics/object-class-type.ts:18

Methods

abs()

abs(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1323

Returns

BaseValueObject

Overrides

BaseValueObject.abs


acos()

acos(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1090

Returns

BaseValueObject

Overrides

BaseValueObject.acos


acosh()

acosh(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1099

Returns

BaseValueObject

Overrides

BaseValueObject.acosh


asin()

asin(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1126

Returns

BaseValueObject

Overrides

BaseValueObject.asin


asinh()

asinh(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1135

Returns

BaseValueObject

Overrides

BaseValueObject.asinh


atan()

atan(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1162

Returns

BaseValueObject

Overrides

BaseValueObject.atan


atan2()

atan2(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1180

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.atan2


atan2Inverse()

atan2Inverse(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1184

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.atan2Inverse


atanh()

atanh(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1171

Returns

BaseValueObject

Overrides

BaseValueObject.atanh


binarySearch()

binarySearch(
   valueObject, 
   searchType, 
   matchType): undefined | number

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:710

Parameters

ParameterTypeDefault value
valueObjectBaseValueObjectundefined
searchTypeArrayBinarySearchTypeArrayBinarySearchType.MIN
matchTypeArrayOrderSearchTypeArrayOrderSearchType.MIN

Returns

undefined | number


cbrt()

cbrt(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1063

Returns

BaseValueObject

Overrides

BaseValueObject.cbrt


ceil()

ceil(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1358

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.ceil


ceilInverse()

ceilInverse(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1362

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.ceilInverse


clone()

clone(): ArrayValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:186

Returns

ArrayValueObject


compare()

compare(
   valueObject, 
   operator, 
   isCaseSensitive?): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:980

Parameters

ParameterType
valueObjectBaseValueObject
operatorcompareToken
isCaseSensitive?boolean

Returns

BaseValueObject

Overrides

BaseValueObject.compare


compareBy()

compareBy(value, operator): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:244

Parameters

ParameterType
valuestring | number | boolean
operatorcompareToken

Returns

BaseValueObject

Inherited from

BaseValueObject.compareBy


concatenate()

concatenate(value, concatenateType): string

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:249

Parameters

ParameterTypeDefault value
valuestring | number | booleanundefined
concatenateTypeConcatenateTypeConcatenateType.FRONT

Returns

string

Inherited from

BaseValueObject.concatenate


concatenateBack()

concatenateBack(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:988

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.concatenateBack


concatenateFront()

concatenateFront(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:984

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.concatenateFront


convertToBooleanObjectValue()

convertToBooleanObjectValue(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:462

Returns

BaseValueObject

Inherited from

BaseValueObject.convertToBooleanObjectValue


convertToNumberObjectValue()

convertToNumberObjectValue(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:457

Returns

BaseValueObject

Inherited from

BaseValueObject.convertToNumberObjectValue


cos()

cos(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1072

Returns

BaseValueObject

Overrides

BaseValueObject.cos


cosh()

cosh(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1081

Returns

BaseValueObject

Overrides

BaseValueObject.cosh


count()

count(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:901

Returns

BaseValueObject

Overrides

BaseValueObject.count


countA()

countA(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:914

Returns

BaseValueObject

Overrides

BaseValueObject.countA


countBlank()

countBlank(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:927

Returns

BaseValueObject

Overrides

BaseValueObject.countBlank


dispose()

dispose(): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:170

Returns

void

Overrides

BaseValueObject.dispose


divided()

divided(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:963

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.divided


dividedBy()

dividedBy(value): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:234

Parameters

ParameterType
valuestring | number | boolean

Returns

BaseValueObject

Inherited from

BaseValueObject.dividedBy


exp()

exp(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1314

Returns

BaseValueObject

Overrides

BaseValueObject.exp


flatten()

flatten(): ArrayValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:431

Flatten a 2D array. https://numpy.org/doc/stable/reference/generated/numpy.chararray.flatten.html#numpy.chararray.flatten

Returns

ArrayValueObject


flattenPosition()

flattenPosition(): {
  numberArray: BaseValueObject[];
  numberPosition: number[];
  stringArray: BaseValueObject[];
  stringPosition: number[];
}

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:459

Flatten a 2D array. In Excel, errors and blank cells are ignored, which results in a binary search that cannot strictly adhere to the number of cells.

Returns

{
  numberArray: BaseValueObject[];
  numberPosition: number[];
  stringArray: BaseValueObject[];
  stringPosition: number[];
}
NameTypeDefined in
numberArrayBaseValueObject[]submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:160
numberPositionnumber[]submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:161
stringArrayBaseValueObject[]submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:158
stringPositionnumber[]submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:159

floor()

floor(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1345

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.floor


floorInverse()

floorInverse(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1349

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.floorInverse


get()

get(row, column): Nullable<BaseValueObject>

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:254

Parameters

ParameterType
rownumber
columnnumber

Returns

Nullable<BaseValueObject>


getArrayValue()

getArrayValue(): Nullable<BaseValueObject>[][]

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:237

Returns

Nullable<BaseValueObject>[][]

Overrides

BaseValueObject.getArrayValue


getColumnCount()

getColumnCount(): number

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:200

Returns

number


getCurrentColumn()

getCurrentColumn(): number

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:233

Returns

number


getCurrentRow()

getCurrentRow(): number

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:229

Returns

number


getFirstCell()

getFirstCell(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:374

Returns

BaseValueObject


getFirstTruePosition()

getFirstTruePosition(): Nullable<{
  column: number;
  row: number;
}>

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:357

Returns

Nullable<{ column: number; row: number; }>


getLastCell()

getLastCell(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:379

Returns

BaseValueObject


getLastTruePosition()

getLastTruePosition(): Nullable<{
  column: number;
  row: number;
}>

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:340

Returns

Nullable<{ column: number; row: number; }>


getNegative()

getNegative(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:938

Returns

BaseValueObject

Overrides

BaseValueObject.getNegative


getPattern()

getPattern(): string

Defined in: submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:24

Returns

string

Inherited from

BaseValueObject.getPattern


getRangePosition()

getRangePosition(): {
  endColumn: number;
  endRow: number;
  startColumn: number;
  startRow: number;
}

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:294

Returns

{
  endColumn: number;
  endRow: number;
  startColumn: number;
  startRow: number;
}
NameTypeDefined in
endColumnnumbersubmodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:304
endRownumbersubmodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:302
startColumnnumbersubmodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:303
startRownumbersubmodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:301

getRealValue()

getRealValue(row, column): null | BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:267

Parameters

ParameterType
rownumber
columnnumber

Returns

null | BaseValueObject


getReciprocal()

getReciprocal(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:943

Returns

BaseValueObject

Overrides

BaseValueObject.getReciprocal


getRowCount()

getRowCount(): number

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:192

Returns

number


getSheetId()

getSheetId(): string

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:225

Returns

string


getUnitId()

getUnitId(): string

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:217

Returns

string


getValue()

getValue(): string | number | boolean

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:57

Returns

string | number | boolean

Inherited from

BaseValueObject.getValue


getValueOrDefault()

getValueOrDefault(row, column): Nullable<BaseValueObject>

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:280

Parameters

ParameterType
rownumber
columnnumber

Returns

Nullable<BaseValueObject>


isArray()

isArray(): boolean

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:246

Returns

boolean

Overrides

BaseValueObject.isArray


isAsyncArrayObject()

isAsyncArrayObject(): boolean

Defined in: submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:44

Returns

boolean

Inherited from

BaseValueObject.isAsyncArrayObject


isAsyncObject()

isAsyncObject(): boolean

Defined in: submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:40

Returns

boolean

Inherited from

BaseValueObject.isAsyncObject


isBoolean()

isBoolean(): boolean

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:87

Returns

boolean

Inherited from

BaseValueObject.isBoolean


isCube()

isCube(): boolean

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:75

Returns

boolean

Inherited from

BaseValueObject.isCube


isEqual()

isEqual(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:185

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Inherited from

BaseValueObject.isEqual


isEqualType()

isEqualType(object): boolean

Defined in: submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:60

Parameters

ParameterType
objectObjectClassType

Returns

boolean

Inherited from

BaseValueObject.isEqualType


isError()

isError(): boolean

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:95

Returns

boolean

Inherited from

BaseValueObject.isError


isGreaterThan()

isGreaterThan(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:205

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Inherited from

BaseValueObject.isGreaterThan


isGreaterThanOrEqual()

isGreaterThanOrEqual(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:193

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Inherited from

BaseValueObject.isGreaterThanOrEqual


isLambda()

isLambda(): boolean

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:91

Returns

boolean

Inherited from

BaseValueObject.isLambda


isLessThan()

isLessThan(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:201

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Inherited from

BaseValueObject.isLessThan


isLessThanOrEqual()

isLessThanOrEqual(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:197

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Inherited from

BaseValueObject.isLessThanOrEqual


isNotEqual()

isNotEqual(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:189

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Inherited from

BaseValueObject.isNotEqual


isNull()

isNull(): boolean

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:99

Returns

boolean

Inherited from

BaseValueObject.isNull


isNumber()

isNumber(): boolean

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:83

Returns

boolean

Inherited from

BaseValueObject.isNumber


isReferenceObject()

isReferenceObject(): boolean

Defined in: submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:48

Returns

boolean

Inherited from

BaseValueObject.isReferenceObject


isString()

isString(): boolean

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:79

Returns

boolean

Inherited from

BaseValueObject.isString


isValueObject()

isValueObject(): boolean

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:40

Returns

boolean

Inherited from

BaseValueObject.isValueObject


iterator()

iterator(callback): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:308

Parameters

ParameterType
callback(valueObject, rowIndex, columnIndex) => Nullable<boolean>

Returns

void


iteratorReverse()

iteratorReverse(callback): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:324

Parameters

ParameterType
callback(valueObject, rowIndex, columnIndex) => Nullable<boolean>

Returns

void


log()

log(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1296

Returns

BaseValueObject

Overrides

BaseValueObject.log


log10()

log10(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1305

Returns

BaseValueObject

Overrides

BaseValueObject.log10


map()

map(callbackFn): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:992

return every value in the array after the callback function, excluding the error value

Parameters

ParameterType
callbackFncallbackMapFnType

Returns

BaseValueObject

Overrides

BaseValueObject.map


mapValue()

mapValue(callbackFn): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1007

return every value in the array after the callback function

Parameters

ParameterType
callbackFncallbackMapFnType

Returns

BaseValueObject

Overrides

BaseValueObject.mapValue


max()

max(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:846

Returns

BaseValueObject

Overrides

BaseValueObject.max


mean()

mean(ddof): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1193

Calculate the mean of the entire array.

reference https://numpy.org/doc/stable/reference/generated/numpy.mean.html#numpy.mean

Parameters

ParameterTypeDefault value
ddofnumber0

Returns

BaseValueObject

Overrides

BaseValueObject.mean


median()

median(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1202

Calculate the median of the entire array.

reference https://numpy.org/doc/stable/reference/generated/numpy.median.html

Returns

BaseValueObject

Overrides

BaseValueObject.median


min()

min(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:873

Returns

BaseValueObject

Overrides

BaseValueObject.min


minus()

minus(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:955

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.minus


minusBy()

minusBy(value): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:224

Parameters

ParameterType
valuestring | number | boolean

Returns

BaseValueObject

Inherited from

BaseValueObject.minusBy


mod()

mod(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:967

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.mod


modInverse()

modInverse(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:971

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.modInverse


multiply()

multiply(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:959

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.multiply


multiplyBy()

multiplyBy(value): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:229

Parameters

ParameterType
valuestring | number | boolean

Returns

BaseValueObject

Inherited from

BaseValueObject.multiplyBy


orderSearch()

orderSearch(
   valueObject, 
   searchType, 
   isDesc, 
   isFuzzyMatching): 
  | null
  | void
  | {
  column: number;
  row: number;
}

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:630

Due to the inability to effectively utilize the cache, the sequential matching approach is only used for special matches in XLOOKUP and XMATCH. For example, when match_mode is set to 1 and -1 for an exact match. If not found, it returns the next smaller item.

Parameters

ParameterTypeDefault value
valueObjectBaseValueObjectundefined
searchTypeArrayOrderSearchTypeArrayOrderSearchType.MIN
isDescbooleanfalse
isFuzzyMatchingbooleanfalse

Returns

| null | void | { column: number; row: number; }


pick()

pick(takeArray): ArrayValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:391

Referring to matrix calculations, extract the matching values from a true/false matrix based on parameters and store them in a two-dimensional array. implement x[x<10] https://numpy.org/doc/stable/user/basics.indexing.html

Parameters

ParameterType
takeArrayArrayValueObject

Returns

ArrayValueObject


pickRaw()

pickRaw(takeArray): Nullable<BaseValueObject>[][]

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:397

Parameters

ParameterType
takeArrayArrayValueObject

Returns

Nullable<BaseValueObject>[][]


plus()

plus(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:951

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.plus


plusBy()

plusBy(value): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:219

Parameters

ParameterType
valuestring | number | boolean

Returns

BaseValueObject

Inherited from

BaseValueObject.plusBy


pow()

pow(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1036

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.pow


powInverse()

powInverse(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1045

Parameters

ParameterTypeDescription
valueObjectBaseValueObjectIn the case of an inverse, it is certainly not an array.

Returns

BaseValueObject

Overrides

BaseValueObject.powInverse


round()

round(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1332

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.round


roundInverse()

roundInverse(valueObject): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1336

Parameters

ParameterType
valueObjectBaseValueObject

Returns

BaseValueObject

Overrides

BaseValueObject.roundInverse


set()

set(
   row, 
   column, 
   value): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:284

Parameters

ParameterType
rownumber
columnnumber
valueNullable<BaseValueObject>

Returns

void


setArrayValue()

setArrayValue(value): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:241

Parameters

ParameterType
valueBaseValueObject[][]

Returns

void

Overrides

BaseValueObject.setArrayValue


setColumnCount()

setColumnCount(columnCount): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:204

Parameters

ParameterType
columnCountnumber

Returns

void


setCurrent()

setCurrent(row, column): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:208

Parameters

ParameterType
rownumber
columnnumber

Returns

void


setDefaultValue()

setDefaultValue(value): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:250

Parameters

ParameterType
valueNullable<BaseValueObject>

Returns

void


setPattern()

setPattern(pattern): void

Defined in: submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:32

Only used in NumberValueObject

Parameters

ParameterType
patternstring

Returns

void

Inherited from

BaseValueObject.setPattern


setRowCount()

setRowCount(rowCount): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:196

Parameters

ParameterType
rowCountnumber

Returns

void


setSheetId()

setSheetId(sheetId): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:221

Parameters

ParameterType
sheetIdstring

Returns

void


setUnitId()

setUnitId(unitId): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:213

Parameters

ParameterType
unitIdstring

Returns

void


setValue()

setValue(value): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:67

Parameters

ParameterType
valuestring | number | boolean

Returns

void

Inherited from

BaseValueObject.setValue


sin()

sin(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1108

Returns

BaseValueObject

Overrides

BaseValueObject.sin


sinh()

sinh(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1117

Returns

BaseValueObject

Overrides

BaseValueObject.sinh


slice()

slice(rowParam, columnParam): undefined | ArrayValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:510

I’m looking to perform slicing operations on 2D arrays, similar to the functionality provided by NumPy. https://numpy.org/doc/stable/user/basics.indexing.html

Parameters

ParameterType
rowParamNullable<Nullable<number>[]>
columnParamNullable<Nullable<number>[]>

Returns

undefined | ArrayValueObject

Row Param

start:stop:step

Column Param

start:stop:step


sortByColumn()

sortByColumn(index): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:607

Parameters

ParameterType
indexnumber

Returns

void


sortByRow()

sortByRow(index): void

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:596

Parameters

ParameterType
indexnumber

Returns

void


sqrt()

sqrt(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1054

Returns

BaseValueObject

Overrides

BaseValueObject.sqrt


std()

std(ddof): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1286

STDEV.P (STDEVP): ddof=0, ignore strings and booleans STDEV.S (STDEV): ddof=1, ignore strings and booleans

STDEVPA: ddof=0, STDEVA: ddof=1,

Parameters

ParameterTypeDefault value
ddofnumber0

Returns

BaseValueObject

Overrides

BaseValueObject.std


sum()

sum(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:826

Returns

BaseValueObject

Overrides

BaseValueObject.sum


tan()

tan(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1144

Returns

BaseValueObject

Overrides

BaseValueObject.tan


tanh()

tanh(): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1153

Returns

BaseValueObject

Overrides

BaseValueObject.tanh


toUnitRange()

toUnitRange(): {
  range: {
     endColumn: number;
     endRow: number;
     startColumn: number;
     startRow: number;
    };
  sheetId: string;
  unitId: string;
}

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:44

Returns

{
  range: {
     endColumn: number;
     endRow: number;
     startColumn: number;
     startRow: number;
    };
  sheetId: string;
  unitId: string;
}
NameTypeDefault valueDefined in
range{ endColumn: number; endRow: number; startColumn: number; startRow: number; }-submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:46
range.endColumnnumber-1submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:50
range.endRownumber-1submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:49
range.startColumnnumber-1submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:47
range.startRownumber-1submodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:48
sheetIdstringsubmodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:52
unitIdstringsubmodules/univer/packages/engine-formula/src/engine/value-object/base-value-object.ts:53

Inherited from

BaseValueObject.toUnitRange


toValue()

toValue(): (null | string | number | boolean)[][]

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1371

Returns

(null | string | number | boolean)[][]


transpose()

transpose(): ArrayValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:612

Returns

ArrayValueObject


var()

var(ddof): BaseValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:1244

┌──────────────┬────────────────────────────────┬───────────────────┐ │ Function │ Ignore logical values and text │ Type │ ├──────────────┼────────────────────────────────┼───────────────────┤ │ VAR.S (VAR) │ TRUE │ sample │ │ VAR.P (VARP) │ TRUE │ entire population │ │ VARA │ FALSE │ sample │ │ VARPA │ FALSE │ entire population │ └──────────────┴────────────────────────────────┴───────────────────┘

for VARPA and VARA, strings and FALSE are counted as 0, TRUE is counted as 1 for VAR.S/VAR, or VAR.P/VARP, strings,TRUE and FALSE are ignored Since sum ignores strings and booleans, they are ignored here too, and VAR.S and VAR.P are used more

VAR.S assumes that its arguments are a sample of the population, like numpy.var(data, ddof=1) VAR.P assumes that its arguments are the entire population, like numpy.var(data, ddof=0) numpy.var uses ddof=0 (Delta Degrees of Freedom) by default, so we use ddof=0 here

Parameters

ParameterTypeDefault value
ddofnumber0

Returns

BaseValueObject

Overrides

BaseValueObject.var


create()

static create(rawValue): ArrayValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:110

Create an array value object based on the string or IArrayValueObject data.

Parameters

ParameterType
rawValuestring | IArrayValueObject

Returns

ArrayValueObject


createByArray()

static createByArray(array): ArrayValueObject

Defined in: submodules/univer/packages/engine-formula/src/engine/value-object/array-value-object.ts:119

Create an array value object based on the array data.

Parameters

ParameterType
array(null | string | number | boolean)[][]

Returns

ArrayValueObject