Skip to content

opt over real coeffs #20

@jarlebring

Description

@jarlebring

At some point we changed from designing graphs with complex coefficients and now all graphs have real coefficients. It would therefore be natural to have the real version of the optimizers. Preliminary tests with this in the simulations seems to be very advantageous.

Example:
At the moment

  • A) solve_linsqr minimizes
    min_{c1,c2 in C} ||Ac-b||
    where A in C^{nxm} and b in CC^n. In general A\b will give a complex solution.

We want

  • B) Minimizes
    min_{c1,c2 in R} ||Ac-b||
    where A in C^{nxm} and b in CC^n.

This can be achieved by noting that B is equivalent to

  • C) Minimize
    min_{c1,c2 in R} ||Atilde*c-btilde||
    where
    Atilde=[real(A);imag(A)] in R^{2nxm} and btilde=[real(b);imag(b)] in R^2n. c=Atilde\btilde will return a real vector

In practice, I suggest this is done by (in solve_linsqr) allowing linlsqr to take values :real_backslash, :real_nrmeq, etc.

Metadata

Metadata

Assignees

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