org.apache.ignite.ml.math.primitives.vector.impl

## Class VectorView

- java.lang.Object
- - org.apache.ignite.ml.math.primitives.vector.AbstractVector
  - - org.apache.ignite.ml.math.primitives.vector.impl.VectorView

- All Implemented Interfaces:
    Externalizable, Serializable, Destroyable, MetaAttributes, Vector, StorageOpsMetrics

      public class VectorView
      extends AbstractVector

  Implements the partial view into the parent `Vector`.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.ignite.ml.math.primitives.vector.Vector

      `Vector.Element`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VectorView()` Constructor for `Externalizable` interface.
    `VectorView(Vector parent, int off, int len)`
    `VectorView(VectorStorage sto, int off, int len)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Vector` | `copy()` Creates new copy of this vector.
    `boolean` | `equals(Object o)`
    `Vector` | `like(int crd)` Creates new empty vector of the same underlying class but of different cardinality.
    `Matrix` | `likeMatrix(int rows, int cols)` Creates new matrix of compatible flavor with given size.

    - ### Methods inherited from class org.apache.ignite.ml.math.primitives.vector.AbstractVector

      `all, allSpliterator, assign, assign, assign, assign, checkCardinality, checkCardinality, checkCardinality, checkIndex, compute, copyOfRange, cross, destroy, divide, dot, dotSelf, foldMap, foldMap, get, getDistanceSquared, getElement, getLengthSquared, getMetaStorage, getRaw, getRawX, getStorage, getX, guid, hashCode, increment, incrementX, isArrayBased, isDense, isNumeric, isZero, kNorm, logNormalize, logNormalize, makeElement, map, map, map, maxElement, maxValue, minElement, minus, minValue, nonZeroElements, nonZeroes, nonZeroSpliterator, normalize, normalize, plus, plus, readExternal, set, setRaw, setRawX, setStorage, setX, size, sort, storageGet, storageGetRaw, storageSet, storageSetRaw, sum, times, times, toMatrix, toMatrixPlusOne, viewPart, writeExternal`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.ignite.ml.math.primitives.vector.Vector

      `asArray, labeled`

    - ### Methods inherited from interface org.apache.ignite.ml.math.MetaAttributes

      `getAttribute, hasAttribute, removeAttribute, setAttribute`

- - ### Constructor Detail

    - #### VectorView

          public VectorView()

      Constructor for `Externalizable` interface.

    - #### VectorView

          public VectorView(Vector parent,
                            int off,
                            int len)

      Parameters:
        `parent` - Backing parent `Vector`.
        `off` - Offset to parent vector.
        `len` - Size of the view.

    - #### VectorView

          public VectorView(VectorStorage sto,
                            int off,
                            int len)

      Parameters:
        `sto` - Backing parent `VectorStorage`.
        `off` - Offset to parent vector.
        `len` - Size of the view.

  - ### Method Detail

    - #### copy

          public Vector copy()

      Creates new copy of this vector.
      Specified by:
        `copy` in interface `Vector`
      Overrides:
        `copy` in class `AbstractVector`
      Returns:
        New copy vector.

    - #### like

          public Vector like(int crd)

      Creates new empty vector of the same underlying class but of different cardinality.
      Parameters:
        `crd` - Cardinality for new vector.
      Returns:
        New vector.

    - #### likeMatrix

          public Matrix likeMatrix(int rows,
                                   int cols)

      Creates new matrix of compatible flavor with given size.
      Parameters:
        `rows` - Number of rows.
        `cols` - Number of columns.
      Returns:
        New matrix.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `AbstractVector`

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020