public static IVectorMultipliable convert(IMatrixConvertible matrix, string representation) { switch (representation) { case "CCS": return(new CCS(matrix)); case "CRS": return(new CRS(matrix)); case "Dense2D": return(new Dense2D(matrix)); case "DenseJagged": return(new DenseJagged(matrix)); case "IncidenceList": return(new IncidenceList(matrix)); default: return(null); } }
public Dense2D(IMatrixConvertible matrixRepresentation) { init(matrixRepresentation.toMatrix()); }
public IncidenceList(IMatrixConvertible matrixRepresentation) { init(matrixRepresentation.toMatrix()); }