IndexVector class

IndexVector is a simple vector implementation that returns the index value for each element in the vector. It is functionally equivolant a vector backed by an array with values: [0,1,2,...,length-1]

Signature

  1. export declare class IndexVector extends FunctionalVector<number>

Import

  1. import { IndexVector } from '@grafana/data';

Constructors

ConstructorModifiersDescription
constructor(len)Constructs a new instance of the IndexVector class

Properties

PropertyModifiersTypeDescription
lengthnumber

Methods

MethodModifiersDescription
get(index)
newField(len)staticReturns a field representing the range [0 … length-1]

constructor(len)

Constructs a new instance of the IndexVector class

Signature

  1. constructor(len: number);

Parameters

ParameterTypeDescription
lennumber

length property

Signature

  1. get length(): number;

get method

Signature

  1. get(index: number): number;

Parameters

ParameterTypeDescription
indexnumber

Returns:

number

newField method

Returns a field representing the range [0 … length-1]

Signature

  1. static newField(len: number): Field<number>;

Parameters

ParameterTypeDescription
lennumber

Returns:

Field<number>