Class RankedFeatureVector

    • Constructor Detail

      • RankedFeatureVector

        public RankedFeatureVector​(Alphabet dict,
                                   int[] indices,
                                   double[] values)
      • RankedFeatureVector

        public RankedFeatureVector​(Alphabet dict,
                                   double[] values)
      • RankedFeatureVector

        public RankedFeatureVector​(Alphabet dict,
                                   double[] values,
                                   int begin,
                                   int length)
    • Method Detail

      • setRankOrder

        protected void setRankOrder()
        Add rank annotations for the entire feature vector.
      • setRankOrder

        protected void setRankOrder​(int extent,
                                    boolean reset)
      • setReverseRankOrder

        protected void setReverseRankOrder​(int extent,
                                           boolean reset)
      • setRankOrder

        protected void setRankOrder​(int extent)
      • getMaxValuedIndex

        public int getMaxValuedIndex()
      • getMaxValuedObject

        public java.lang.Object getMaxValuedObject()
      • getMaxValuedObjectIn

        public java.lang.Object getMaxValuedObjectIn​(FeatureSelection fs)
      • getMaxValue

        public double getMaxValue()
      • getIndexAtRank

        public int getIndexAtRank​(int rank)
      • getObjectAtRank

        public java.lang.Object getObjectAtRank​(int rank)
      • getValueAtRank

        public double getValueAtRank​(int rank)
      • printByRank

        public void printByRank​(java.io.OutputStream out)
        Prints a human-readable version of this vector, with features listed in ranked order.
        Parameters:
        out - Stream to write to
      • printByRank

        public void printByRank​(java.io.PrintWriter out)
        Prints a human-readable version of this vector, with features listed in ranked order.
        Parameters:
        out - Writer to write to
      • printTopK

        public void printTopK​(java.io.PrintWriter out,
                              int num)
      • printLowerK

        public void printLowerK​(java.io.PrintWriter out,
                                int num)
      • getRank

        public int getRank​(java.lang.Object o)
      • getRank

        public int getRank​(int index)
      • set

        public void set​(int i,
                        double v)