// This file is part of the Herezh++ application.
//
// The finite element software Herezh++ is dedicated to the field
// of mechanics for large transformations of solid structures.
// It is developed by Gérard Rio (APP: IDDN.FR.010.0106078.000.R.P.2006.035.20600)
// INSTITUT DE RECHERCHE DUPUY DE LÔME (IRDL) <https://www.irdl.fr/>.
//
// Herezh++ is distributed under GPL 3 license ou ultérieure.
//
// Copyright (C) 1997-2022 Université Bretagne Sud (France)
// AUTHOR : Gérard Rio
// E-MAIL  : gerardrio56@free.fr
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//
// For more information, please consult: <https://herezh.irdl.fr/>.


/************************************************************************
 *         UNIVERSITE DE BRETAGNE SUD   --- I.U.P/I.U.T. DE LORIENT     *
 ************************************************************************
 *           LABORATOIRE DE GENIE MECANIQUE ET MATERIAUX                *
 *                        Tel 97.80.80.60                               *
 *          Centre de Genie Industriel  56520 GUIDEL-PLAGES             *
 ************************************************************************
 *     DATE:        14/05/98                                            *
 *                                                                $     *
 *     AUTEUR:      G RIO                                               *
 *                                                                $     *
 *     PROJET:      Herezh++                                            *
 *                                                                $     *
 ************************************************************************
 *     BUT: Stockage d'une valeur propre et d'un vecteur propre éventuel*
 *                                                                $     *
 *     ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''     *                                                                      *
 *     VERIFICATION:                                                    *
 *                                                                      *
 *     !  date  !   auteur   !       but                          !     *
 *     ------------------------------------------------------------     *
 *     !        !            !                                    !     *
 *                                                                $     *
 *     ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''     *
 *     MODIFICATIONS:                                                   *
 *     !  date  !   auteur   !       but                          !     *
 *     ------------------------------------------------------------     *
 *                                                                $     *
 ************************************************************************/
#ifndef VEURPROPRE_H
#define VEURPROPRE_H

#include "Vecteur.h"

class VeurPropre
{
 // surcharge de l'operator de lecture
 // les informations sont le type puis  les datas 
 friend istream & operator >> (istream &, VeurPropre &);
 // surcharge de l'operator d'ecriture non formatée
 // les informations sont le type puis  les datas séparées par
 // un espace
 friend ostream & operator << (ostream &, const VeurPropre &);
 
 public :
    // CONSTRUCTEURS :
    // définition d'une instance qui ne contiend qu'une valeur propre
    VeurPropre();
    // définition d'une instance qui contiend une valeur propre et
    // un vecteur propre de dimension n
    VeurPropre(int n);
    // définition d'une instance à partir d'une valeur et d'un vecteur propre
    VeurPropre(double val,Vecteur v );

    // constructeur de copie
    VeurPropre(const VeurPropre& a);
    
    // DESTRUCTEUR :
    ~VeurPropre();
    
    // surcharge de l'affectation
    VeurPropre& operator= (const VeurPropre& a);
    
    // METHODES PUBLIQUES :
    // retourne la valeur propre
    inline double& Val() { return val;};
    // retourne le vecteur propre
    inline Vecteur& Pv() {return *pv;};
	// Affichage de la valeur propre et du vecteur correspondant.
	void Affiche ()  const ;
    
  private :  
    // VARIABLES PROTEGEES :
    double    val ; // la valeur propre
    Vecteur * pv; // contenant un vecteur propre éventuel
    
    
    // METHODES PROTEGEES :

 };
 
#endif