human-logic
    Preparing search index...

    Class Logic

    Main Fuzzy Common Sense Logic Class

    Index
    • Basic constructor. See fromCategory, fromArray and fromValues for more convenient instantiation methods.

      Parameters

      • Optional_undef: number
      • Optional_false: number
      • Optional_never: number
      • Optional_maybe: number
      • Optional_true: number

      Returns Logic

    • Adds value to current value (category by category). Useful for accumulation of fuzzy sums (usually with normalization in the end). Mutates the current object.

      Parameters

      Returns Logic

      Mutated this object.

    • Returns true if category is the dominating category of this object.

      Parameters

      Returns boolean

    • Checks that at least one of the categories has non-zero Fuzzy value.

      Returns boolean

    • Returns true if category is not the dominating category of this object.

      Parameters

      Returns boolean

    • If original values are not normalized, returns new Logic object with normalized Logic value, otherwise return the same object.

      The Logic value is normalized if and only if the sum of Fuzzy values of all categories equals to 1.0 (or 0.0 if there are no categories with Fuzzy value greater than Fuzzy.FUZZY_FALSE).

      Returns Logic