Class FeatureBlockVector

  • All Implemented Interfaces:

    
    public final class FeatureBlockVector
    extends RealVector
                        

    A lightweight RealVector implementation backed by a FeatureBlock.

    Unlike ArrayRealVector, this class does NOT hold its own double[] data array. Instead, all get/set operations are delegated to the shared FeatureBlock, which stores all node feature vectors in a single contiguous DoubleArray.

    This dramatically reduces heap object count: for a document with N nodes, we go from N double[] arrays (one per ArrayRealVector) to a single DoubleArray in the block.

    Only the core accessor methods (getEntry, setEntry, getDimension) are supported; vector-arithmetic methods (append, ebeMultiply, ebeDivide, etc.) throw UnsupportedOperationException as they are never used in feature access patterns.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Integer getDimension()
      Double getEntry(Integer index)
      Unit setEntry(Integer index, Double value)
      RealVector copy() Creates an independent copy of this row as an ArrayRealVector.
      RealVector append(RealVector v)
      RealVector append(Double d)
      RealVector getSubVector(Integer index, Integer n)
      Void setSubVector(Integer index, RealVector v)
      Boolean isNaN()
      Boolean isInfinite()
      RealVector ebeDivide(RealVector v)
      RealVector ebeMultiply(RealVector v)
      • Methods inherited from class org.apache.commons.math3.linear.RealVector

        add, addToEntry, combine, combineToSelf, cosine, dotProduct, equals, getDistance, getL1Distance, getL1Norm, getLInfDistance, getLInfNorm, getMaxIndex, getMaxValue, getMinIndex, getMinValue, getNorm, hashCode, iterator, map, mapAdd, mapAddToSelf, mapDivide, mapDivideToSelf, mapMultiply, mapMultiplyToSelf, mapSubtract, mapSubtractToSelf, mapToSelf, outerProduct, projection, set, sparseIterator, subtract, toArray, unitVector, unitize, walkInDefaultOrder, walkInDefaultOrder, walkInDefaultOrder, walkInDefaultOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait