Add serialization to named vectors and matrices

This commit is contained in:
darksnake 2017-06-14 18:19:03 +03:00
parent d01cfd5a32
commit 248cd5f64a

View File

@ -45,7 +45,7 @@ public class SpectrumInformation {
} }
NamedMatrix info = this.getInformationMatrix(set, data, names); NamedMatrix info = this.getInformationMatrix(set, data, names);
RealMatrix cov = inverse(info.getMatrix()); RealMatrix cov = inverse(info.getMatrix());
return new NamedMatrix(cov, names); return new NamedMatrix(names, cov);
} }
/** /**
@ -76,7 +76,7 @@ public class SpectrumInformation {
res = res.add(getPointInfoMatrix(set, reader.getX(dp).doubleValue(), reader.getTime(dp), names).getMatrix()); res = res.add(getPointInfoMatrix(set, reader.getX(dp).doubleValue(), reader.getTime(dp), names).getMatrix());
} }
return new NamedMatrix(res, names); return new NamedMatrix(names, res);
} }
// формула правильная! // формула правильная!
@ -106,7 +106,7 @@ public class SpectrumInformation {
} }
} }
return new NamedMatrix(res, names); return new NamedMatrix(names, res);
} }