56 lines
1.4 KiB
C++
56 lines
1.4 KiB
C++
#pragma once
|
|
|
|
/**
|
|
* \file IO.h
|
|
* \brief Contient des fonctions utiles pour travailler avec les systèmes d'entrée et de sortie
|
|
*/
|
|
|
|
#include <string>
|
|
|
|
class Matrix;
|
|
class Vect;
|
|
class VectAffine;
|
|
class BigInt;
|
|
|
|
std::ostream& operator<<(std::ostream& stream, const Matrix& mat);
|
|
std::istream& operator>>(std::istream& stream, Matrix& mat);
|
|
|
|
std::ostream& operator<<(std::ostream& stream, const BigInt& nbre);
|
|
std::istream& operator>>(std::istream& stream, BigInt& nbre);
|
|
|
|
/**
|
|
* \brief Charge une matrice à partir d'un fichier
|
|
* \param fileName Le chemin du fichier à charger
|
|
* \return Une matrice de taille nulle si une erreur intervient
|
|
*/
|
|
Matrix LoadMatrix(const std::string& fileName);
|
|
|
|
/**
|
|
* \brief Sauvegarde une matrice dans un fichier
|
|
* \param mat La matrice à sauver
|
|
* \param fileName Le chemin du fichier à écrire
|
|
*/
|
|
void SaveMatrix(const Matrix& mat, const std::string& fileName);
|
|
|
|
/**
|
|
* \brief Permet de saisir une matrice à partir de la console
|
|
*/
|
|
Matrix InsertMatrix();
|
|
|
|
/**
|
|
* \brief Affiche une matrice dans la console
|
|
* \param mat La matrice à afficher
|
|
*/
|
|
void Print(const Matrix& mat);
|
|
|
|
/**
|
|
* \brief Affiche un espace vectoriel dans la console
|
|
* \param vect L'espace vectoriel à afficher
|
|
*/
|
|
void Print(const Vect& vect);
|
|
|
|
/**
|
|
* \brief Affiche un espace affine dans la console
|
|
* \param vect L'espace affine à afficher
|
|
*/
|
|
void Print(const VectAffine& vect); |