private static DenseTestData <Complex> ReadDenseTestData(Stream stream) { var data = Tests.Double.DenseTestDataReader.Read(stream); var result = new DenseTestData <Complex>(); result.A = ToComplex(data.A); result.B = ToComplex(data.B); result.x = ToComplex(data.x); result.y = ToComplex(data.y); result.AT = ToComplex(data.AT); result.BT = ToComplex(data.BT); result.ApB = ToComplex(data.ApB); result.AmBT = ToComplex(data.AmBT); result.ATmB = ToComplex(data.ATmB); result.Ax = ToComplex(data.Ax); result.ATy = ToComplex(data.ATy); result.xTBT = ToComplex(data.xTBT); return(result); }
private static SparseTestData <Complex> DenseToSparse(DenseTestData <Complex> dense) { var data = new SparseTestData <Complex>() { RowCount = dense.RowCount, ColumnCount = dense.ColumnCount }; data.A = DenseToSparse(dense.A); data.B = DenseToSparse(dense.B); data.x = dense.x; data.y = dense.y; data.AT = DenseToSparse(dense.AT); data.BT = DenseToSparse(dense.BT); data.ApB = DenseToSparse(dense.ApB); data.AmBT = DenseToSparse(dense.AmBT); data.ATmB = DenseToSparse(dense.ATmB); data.Ax = dense.Ax; data.ATy = dense.ATy; data.xTBT = dense.xTBT; return(data); }