package ie.dcu.matrix; /** * Interface for classes that can provide matrices. * * @author Kevin McGuinness */ public interface MatrixProvider { /** * Returns the default type created by this matrix provider if no type * is specified when calling getMatrix(). This may be null * if it is unknown. * * @return The default matrix type. */ public Matrix.Type getDefaultMatrixType(); /** * Request a matrix from the matrix provider. * * @param alwaysCopy * If true the a copy is always returned, otherwise * the matrix may or may not be a copy. * @return A matrix. */ public Matrix getMatrix(boolean alwaysCopy); /** * Request a matrix of the given type from the matrix provider. * * @param type * The matrix type. If null then the most convenient * type for the receiver will be returned. * @param alwaysCopy * If true the a copy is always returned, otherwise * the matrix may or may not be a copy. * @return A matrix. */ public Matrix getMatrix(Matrix.Type type, boolean alwaysCopy); }