Opened 15 years ago

Closed 14 years ago

#42 closed request (fixed)

constructor matrix(void), should it exist?

Reported by: Jari Häkkinen Owned by: Jari Häkkinen
Priority: major Milestone: yat 0.2
Component: gslapi Version: trunk
Keywords: Cc:

Description (last modified by Jari Häkkinen)

See also #53 and #169

Should this constructor exist? What is the idea of having it? If one creates a matrix as "matrix m;" there is only one way to check if it is valid. Check whether m.gsl_matrix_p() is NULL or not. Is this well designed?

Peter sees no point in having an empty matrix (vector).

Peter, as spokesman of Markus, one point of having the the void constructor is to send the object into functions (in C-style)

Markus says, well Peter himself is inventing functions like matrix::nan(matrix&) which is a case where one typically needs to use the void constructor first before calling nan.

Change History (8)

comment:1 Changed 15 years ago by Peter

Description: modified (diff)

comment:2 Changed 15 years ago by Peter

Description: modified (diff)

comment:3 Changed 15 years ago by Peter

Component: classifiergslapi

see ticket #53

comment:4 Changed 14 years ago by Jari Häkkinen

Milestone: later0.2

comment:5 Changed 14 years ago by Markus Ringnér

Description: modified (diff)

comment:6 Changed 14 years ago by Jari Häkkinen

Description: modified (diff)

comment:7 Changed 14 years ago by Jari Häkkinen

Description: modified (diff)

It is decided that size() should check if gsl_matrix is NULL, zero is returned.

comment:8 Changed 14 years ago by Peter

Resolution: fixed
Status: newclosed

(In [732]) fixes #42

Note: See TracTickets for help on using tickets.