Interface TwoDimensionalCounterInterface<K1,​K2>

  • All Known Implementing Classes:
    TwoDimensionalCounter

    public interface TwoDimensionalCounterInterface<K1,​K2>
    Interface representing a mapping between pairs of typed objects and double values.
    Author:
    Angel Chang
    • Method Detail

      • defaultReturnValue

        void defaultReturnValue​(double rv)
      • defaultReturnValue

        double defaultReturnValue()
      • size

        int size()
        Returns:
        total number of entries (key pairs)
      • containsKey

        boolean containsKey​(K1 o1,
                            K2 o2)
      • incrementCount

        void incrementCount​(K1 o1,
                            K2 o2)
      • incrementCount

        void incrementCount​(K1 o1,
                            K2 o2,
                            double count)
      • decrementCount

        void decrementCount​(K1 o1,
                            K2 o2)
      • decrementCount

        void decrementCount​(K1 o1,
                            K2 o2,
                            double count)
      • setCount

        void setCount​(K1 o1,
                      K2 o2,
                      double count)
      • remove

        double remove​(K1 o1,
                      K2 o2)
      • getCount

        double getCount​(K1 o1,
                        K2 o2)
      • totalCount

        double totalCount()
      • totalCount

        double totalCount​(K1 k1)
      • firstKeySet

        Set<K1> firstKeySet()
      • secondKeySet

        Set<K2> secondKeySet()
      • isEmpty

        boolean isEmpty()
      • remove

        void remove​(K1 key)
      • toMatrixString

        String toMatrixString​(int cellSize)
      • toMatrix

        double[][] toMatrix​(List<K1> firstKeys,
                            List<K2> secondKeys)
        Given an ordering of the first (row) and second (column) keys, will produce a double matrix.
      • getCounter

        Counter<K2> getCounter​(K1 o)
        Returns:
        the inner Counter associated with key o