PiMath API
    Preparing search index...

    Interface RandomPolynomConfig

    Options of rndPolynom.

    interface RandomPolynomConfig {
        allow?: {
            commonFactor?: boolean;
            negativeLeading?: boolean;
            nullMonom?: boolean;
        };
        commonConstant?: boolean;
        degree?: number;
        factorable?: boolean;
        fraction?: boolean
        | RandomCoefficientConfig;
        numberOfMonoms?: number;
        unit?: boolean;
        variables?: string;
    }
    Index
    allow?: {
        commonFactor?: boolean;
        negativeLeading?: boolean;
        nullMonom?: boolean;
    }

    Type Declaration

    • OptionalcommonFactor?: boolean

      Allow a common factor between the integer coefficients (default true); false divides it out, and with factorable also adds no constant factor. The division is skipped with fractions.

    • OptionalnegativeLeading?: boolean

      Allow a negative leading coefficient (default false: the polynom is negated if needed).

    • OptionalnullMonom?: boolean

      Non-leading terms may have a zero coefficient, i.e. be absent (default true).

    commonConstant?: boolean

    Only for factorable: true. undefined (default): a non-unit integer constant factor is sometimes added; false: never; true: always, with an absolute value of at least 2. Contradicts allow.commonFactor: false (which asks for no common factor at all) and throws with it.

    degree?: number

    Degree, a non-negative integer (default 2).

    factorable?: boolean

    Build the polynom as a product of degree linear factors (default false).

    fraction?: boolean | RandomCoefficientConfig

    Coefficients: false (default) gives integers, true fractions, an object gives full control.

    numberOfMonoms?: number

    Maximum number of terms (default 0: no limit). Ignored when the polynom already has fewer terms.

    unit?: boolean

    Force a leading coefficient equal to 1 (default false).

    variables?: string

    Variables of the polynom, one lowercase letter each (default 'x').