Skip to content

Make ComplexField::norm1 return the sum of the absolute values of all coefficients #106

Description

@afossa

For the types that implement ComplexField, the implementation of norm1 delegates to abs.

I would propose to change the implementation such that it computes the sum of the absolute values of all coefficients.

  • for Dual this is simply re.abs() + eps.abs().
  • for DualVec, this is re.abs() plus the sum of all e.abs(), where e are the entries of eps.
  • for Dual2 and Dual2Vec, we need to agree on how to interpret the 1-norm of v2. I would take the sum of the abs values scaled by 1/2, such that it coincides with the sum of the abs values of the second-order coefficients of the Taylor expansion.

This new behavior would then mimic, for example, that of GTPSA.normTPS. It would also allow to use its output as convergence criterion in iterative algorithms that update dual numbers recursively until some convergence is achieved.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions