Class SimpleAccumulator

  • All Implemented Interfaces:
    Accumulator

    public class SimpleAccumulator
    extends java.lang.Object
    implements Accumulator
    This implementation of an accumulator simply sums up the categorizations of the argument trees. Values of pro-trees are added and values of con-trees are subtracted.
    Author:
    Matthias Thimm
    • Method Summary

      Modifier and Type Method Description
      double accumulate​(java.util.List<java.lang.Double> pro, java.util.List<java.lang.Double> contra)
      Accumulates the pros and contras of the given list into a single double.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleAccumulator

        public SimpleAccumulator()
    • Method Detail

      • accumulate

        public double accumulate​(java.util.List<java.lang.Double> pro,
                                 java.util.List<java.lang.Double> contra)
        Description copied from interface: Accumulator
        Accumulates the pros and contras of the given list into a single double. The higher the value the more convincing the pros, the lower the more convincing the contras. In general, if the value is greater 0 then the query under consideration can be accepted.
        Specified by:
        accumulate in interface Accumulator
        Parameters:
        pro - some doubles.
        contra - some doubles.
        Returns:
        a double.