Opened 12 years ago

Closed 12 years ago

#510 closed request (fixed)

funtion creating vector<vector<T>> from istream

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

Description

In Vector and Matrix the istream constructors contain code loading a vector<vector<double> > from the istream. We should lift out this to a function.

  1. This will avoid duplicating code.
  2. The function might be useful elsewhere.

There is no reason to limit to double, so why not allow types such as int and string as well.

Change History (7)

comment:1 Changed 12 years ago by Peter

Status: newassigned

comment:2 Changed 12 years ago by Peter

(In [1922]) working on ticket 510 (refs #510)

comment:3 Changed 12 years ago by Peter

(In [1923]) refs #510 - avoid problem with empty lines

comment:4 Changed 12 years ago by Peter

(In [1927]) refs #510 using load function in Matrix istream constructor. Behavior should be as before except that when Matrix is invalid the error message no longer contains info on which row and column that failed.

comment:5 Changed 12 years ago by Peter

(In [1928]) refs #510 - allow function 'load' to ignore empty lines and check that columns contains equally many columns. remove corresponding code in Matrix.

comment:6 Changed 12 years ago by Peter

(In [1929]) refs #510. using load function in Vector(istream) constructor

comment:7 Changed 12 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [1930]) avoid copying in MatrixWeighted??(istream), i.e., avoid use of intermediate Matrix. closes #510

Note: See TracTickets for help on using tickets.