38template <
class T>
class unit
45 unit(
const char *nom=
"",
int typ=
ENTREE,
int xx=0,
int yy=0,
int zz=0,
47 {
set(nom,typ,xx,yy,zz,bia,sor); }
85 const char *
nm()
const {
return(
_nm); }
89 int t()
const {
return(
_t); }
91 T
o()
const {
return(
_o); }
93 int x()
const {
return(
_x); }
95 int y()
const {
return(
_y); }
97 int z()
const {
return(
_z); }
103 void set(
const char *nom,
int typ,
int xx,
int yy,
int zz,
152 && !(strcmp(
_nm, u.
_nm)) );
177 return(
_t <= u.
_t );
183 return(
_t >= u.
_t );
unit< T > & operator*=(const unit< T > &u)
void errtyp() const
Affiche un message d'erreur de type.
unit< T > & operator*(const unit< T > &u)
unit< T > & operator/(const unit< T > &u)
int operator==(const unit< T > &u) const
Egalité de nom, position, type, biais.
unit< T > & operator+(const unit< T > &u)
int _x
Champs coordonnées.
void aff() const
Affiche les caractéristiques du neurone.
int operator!=(const unit< T > &u) const
Inégalité.
void set_coord(int xx, int yy, int zz)
Fixe les coordonnées.
void set_bi(T bia)
Fixe le biais.
int operator<(const unit< T > &u) const
Comparaison de type.
void set(const char *nom, int typ, int xx, int yy, int zz, T bia, T sor)
Fixe tous les champs à la fois.
unit(const char *nom="", int typ=ENTREE, int xx=0, int yy=0, int zz=0, T bia=0, T sor=0)
Constructeur.
unit< T > & operator^(const unit< T > &u)
int operator>=(const unit< T > &u) const
void set_o(T sor)
Fixe l'état de sortie.
unit< T > & operator+=(const unit< T > &u)
int operator<=(const unit< T > &u) const
int t() const
Type de neurone.
void set_nm(const char *nom)
Fixe le nom du neurone.
int operator>(const unit< T > &u) const
unit< T > & operator-(const unit< T > &u)
void set_t(int typ)
Fixe le type de neurone.
const char * nm() const
Nom du neurone.
unit< T > & operator/=(const unit< T > &u)
unit< T > & operator-=(const unit< T > &u)
unit< T > & operator=(const unit< T > &u)