Class Logic

Main Fuzzy Common Sense Logic Class

Hierarchy

  • Logic

Constructors

  • 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

Methods

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

    Returns

    Mutated this object.

    Parameters

    Returns Logic

  • 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_FALSE).

    Returns Logic

Generated using TypeDoc