Thanks Thomas,
That’s helpful, but I think you should add more easy-to-use functions for the 
convenience of the research community who just want to implement some algorithm 
and not spend time with coding IO.

For my second question; why is there no vector - matrix multiplication 
operator?, i.e. x A, where x is a vector and A a matrix.


-----Original Message-----
From: Thomas Neidhart [mailto:[email protected]] 
Sent: Friday, February 20, 2015 1:50 AM
To: Commons Users List
Subject: Re: how to load a RealMatrix from file

Hi Joakim,

it depends how you stored the matrix in the first place.

The MatrixUtils.deserializeRealMatrix() method will only work if you have 
previously serialized the matrix using MatrixUtils.serializeRealMatrix() and is 
mainly intended to be used for standard Java serialization.

In case you want to load a matrix stored in text format, you might find the 
RealMatrixFormat class useful.
There are two formats defined:

 * MatrixUtils.DEFAULT_FORMAT
 * MatrixUtils.OCTAVE_FORMAT

but you can define your own format for formatting/parsing.

Thomas


On Fri, Feb 20, 2015 at 6:02 AM, Joakim Soderberg <[email protected]>
wrote:

> Hello,
>
> Can someone please explain the easiest way to load a RealMatrix from flle?
>
> I have found MatrixUtils.deserializeRealMatrix(Object instance, String 
> fieldName, ObjectInputStream ois)
>
>
>
> But I was expecting to find a function like this:
>
>                 loadMatrix( inputStream)
>
>
>
> And why doesn't RealVector have an "operate" for Vector - Matrix 
> multiplication?
>
>
>
> cheers
>
> /J
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to