Skip to content

Missing check on SVD decomposition #17

@giordano

Description

@giordano

If SVD decomposition fails at

svd ( U, s, V, Asmall );
then s is reset and the following instruction s( 0 ) causes the program to terminate with the following error:

error: Mat::operator(): index out of bounds
terminate called after throwing an instance of 'std::logic_error'
  what():  Mat::operator(): index out of bounds

svd function actually returns a bool flag to indicate whether decomposition was successful or not. Glimpse should check the value of the returned flag and deal with the case where the decomposition failed.

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