Class FeatureVector

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.List

    public final class FeatureVector
    extends de.julielab.gnu.trove.TLinkedList
    A FeatureVector that can hold up to two FeatureVector instances inside it, which allows for a very quick concatenation operation.

    Also, in order to avoid copies, the second of these internal FeatureVector instances can be negated, so that it has the effect of subtracting any values rather than adding them.

    Created: Sat Nov 10 15:25:10 2001

    Version:
    $Id: FeatureVector.java 90 2007-01-17 07:42:20Z jasonbaldridge $
    Author:
    Jason Baldridge
    See Also:
    Feature, Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class de.julielab.gnu.trove.TLinkedList

        de.julielab.gnu.trove.TLinkedList.IteratorImpl
    • Field Summary

      • Fields inherited from class de.julielab.gnu.trove.TLinkedList

        _head, _size, _tail
      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, double value)  
      FeatureVector cat​(FeatureVector fl2)  
      double dotProduct​(FeatureVector fl2)  
      FeatureVector getDistVector​(FeatureVector fl2)  
      double getScore​(double[] parameters)  
      int[] keys()  
      java.lang.String toString()  
      void update​(double[] parameters, double[] total, double alpha_k, double upd)  
      • Methods inherited from class de.julielab.gnu.trove.TLinkedList

        add, add, addBefore, addFirst, addLast, clear, contains, getFirst, getLast, insert, listIterator, remove, removeFirst, removeLast, size, toArray, toUnlinkedArray
      • Methods inherited from class java.util.AbstractSequentialList

        addAll, get, iterator, remove, set
      • Methods inherited from class java.util.AbstractList

        equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
      • Methods inherited from class java.util.AbstractCollection

        addAll, containsAll, isEmpty, removeAll, retainAll, toArray
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        addAll, containsAll, isEmpty, removeAll, replaceAll, retainAll, sort, spliterator, toArray
    • Method Detail

      • add

        public void add​(int index,
                        double value)
      • keys

        public int[] keys()
      • getScore

        public final double getScore​(double[] parameters)
      • update

        public void update​(double[] parameters,
                           double[] total,
                           double alpha_k,
                           double upd)
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractCollection