Class NumberToComplexDecorator

  • All Implemented Interfaces:
    FieldI, java.io.Serializable

    public class NumberToComplexDecorator
    extends FieldDecorator
    Convert all Number types to Complex, and optionally convert result to Doubles if possible. By default results will always be complex, but if the simplifyResults is set in the constructor real results will be converted to Doubles.
    See Also:
    ComplexField, Serialized Form
    • Constructor Detail

      • NumberToComplexDecorator

        public NumberToComplexDecorator​(FieldI field)
      • NumberToComplexDecorator

        public NumberToComplexDecorator​(FieldI field,
                                        boolean simplifyResults)
        If simplifyResults is true any complex results which represent real numbers will be converted back to doubles.
        Parameters:
        field - base field
        simplifyResults - whether to try to convert real results back to Doubles.