Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#454 closed discussion (fixed)

Matrix(0, 42) or its transpose Matrix(42, 0) is not allowed

Reported by: Peter Owned by: Peter
Priority: trivial Milestone: yat 0.6
Component: utility Version: trunk
Keywords: Cc:

Description

Should we allow Matrix(0,42)?

Currently it is allowed, but since the created Matrix will hold a gsl_matrix* = NULL, which implies the created Matrix is equivalent to Matrix(0,0), i.e., rows() and columns() return 0.

OTOH, there is an assert that checks that columns() and rows() are either both zero or non-zero.

Change History (6)

comment:1 Changed 12 years ago by Peter

Milestone: yat 0.x+yat 0.6

comment:2 Changed 12 years ago by Jari Häkkinen

Can there be matrices without rows or without columns. 0 rows and 10 columns? I say do not support these strange beasts.

comment:3 Changed 12 years ago by Peter

OK. I think we should add the same restriction in MatrixWeighted.

comment:4 Changed 12 years ago by Peter

Status: newassigned

comment:5 Changed 12 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [1890]) fixes #454 - throw exception when detecting funky dimensions

comment:6 Changed 12 years ago by Peter

(In [1891]) refs #454 - forgot the last file in r1890

Note: See TracTickets for help on using tickets.