Neuron: neural networks


unit< T > Class Template Reference

Unité : neurone de base, classe unit. More...

#include <neur/mlp/unit.h>

Collaboration diagram for unit< T >:

Public Member Functions

Constructeurs - Destructeur
 unit (const char *nom="", int typ=ENTREE, int xx=0, int yy=0, int zz=0, T bia=0, T sor=0)
 Constructeur.
 
 ~unit ()
 Destructeur.
 
Opérateurs
unit< T > & operator= (const unit< T > &u)
 
unit< T > & operator+ (const unit< T > &u)
 
unit< T > & operator- (const unit< T > &u)
 
unit< T > & operator* (const unit< T > &u)
 
unit< T > & operator/ (const unit< T > &u)
 
unit< T > & operator^ (const unit< T > &u)
 
unit< T > & operator++ ()
 
unit< T > & operator+= (const unit< T > &u)
 
unit< T > & operator-= (const unit< T > &u)
 
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.
 
int operator!= (const unit< T > &u) const
 Inégalité.
 
int operator< (const unit< T > &u) const
 Comparaison de type.
 
int operator> (const unit< T > &u) const
 
int operator<= (const unit< T > &u) const
 
int operator>= (const unit< T > &u) const
 
Accès aux champs
const char * nm () const
 Nom du neurone.
 
bi () const
 Biais.
 
int t () const
 Type de neurone.
 
o () const
 Sortie.
 
int x () const
 Position x.
 
int y () const
 Position y.
 
int z () const
 Position z.
 
Modification des champs
void set (const char *nom, int typ, int xx, int yy, int zz, T bia, T sor)
 Fixe tous les champs à la fois.
 
void set_nm (const char *nom)
 Fixe le nom du neurone.
 
void set_t (int typ)
 Fixe le type de neurone.
 
void set_coord (int xx, int yy, int zz)
 Fixe les coordonnées.
 
void set_bi (T bia)
 Fixe le biais.
 
void set_o (T sor)
 Fixe l'état de sortie.
 

Fonctions

char _nm [12]
 Champ nom.
 
_bi
 Champ biais.
 
int _t
 Champ type.
 
_o
 Champ sortie.
 
int _x
 Champs coordonnées.
 
int _y
 
int _z
 
void aff () const
 Affiche les caractéristiques du neurone.
 
void errtyp () const
 Affiche un message d'erreur de type.
 

Detailed Description

template<class T>
class unit< T >

Unité : neurone de base, classe unit.

\ \ template<class T> class unit; \ \ Cette classe représente un neurone dans un réseau. Une unité garde en mémoire son nom (nm), son type (t), son biais (bi), son état de sortie (o) et ses coordonnées (x, y, z), qui sont utilisées pour la représentation graphique par le logiciel SNNS. \ La classe T est le type numérique utilisé pour représenter le biais et la sortie: par exemple: int ou double.

Definition at line 38 of file unit.h.

Constructor & Destructor Documentation

◆ unit()

template<class T>
unit< T >::unit ( const char * nom = "",
int typ = ENTREE,
int xx = 0,
int yy = 0,
int zz = 0,
T bia = 0,
T sor = 0 )
inline

◆ ~unit()

template<class T>
unit< T >::~unit ( )
inline

Destructeur.

Definition at line 50 of file unit.h.

Member Function Documentation

◆ aff()

template<class T>
void unit< T >::aff ( ) const

Affiche les caractéristiques du neurone.

◆ bi()

template<class T>
T unit< T >::bi ( ) const
inline

Biais.

Definition at line 87 of file unit.h.

References _bi.

◆ errtyp()

template<class T>
void unit< T >::errtyp ( ) const
protected

Affiche un message d'erreur de type.

◆ nm()

template<class T>
const char * unit< T >::nm ( ) const
inline

Nom du neurone.

Definition at line 85 of file unit.h.

References _nm.

◆ o()

template<class T>
T unit< T >::o ( ) const
inline

Sortie.

Definition at line 91 of file unit.h.

References _o.

◆ operator!=()

template<class T>
int unit< T >::operator!= ( const unit< T > & u) const
inline

Inégalité.

Definition at line 156 of file unit.h.

References _bi, _nm, _t, _x, _y, _z, and unit().

◆ operator*()

template<class T>
unit< T > & unit< T >::operator* ( const unit< T > & u)

References unit().

◆ operator*=()

template<class T>
unit< T > & unit< T >::operator*= ( const unit< T > & u)

References unit().

◆ operator+()

template<class T>
unit< T > & unit< T >::operator+ ( const unit< T > & u)

References unit().

◆ operator++()

template<class T>
unit< T > & unit< T >::operator++ ( )

References unit().

◆ operator+=()

template<class T>
unit< T > & unit< T >::operator+= ( const unit< T > & u)

References unit().

◆ operator-()

template<class T>
unit< T > & unit< T >::operator- ( const unit< T > & u)

References unit().

◆ operator-=()

template<class T>
unit< T > & unit< T >::operator-= ( const unit< T > & u)

References unit().

◆ operator/()

template<class T>
unit< T > & unit< T >::operator/ ( const unit< T > & u)

References unit().

◆ operator/=()

template<class T>
unit< T > & unit< T >::operator/= ( const unit< T > & u)

References unit().

◆ operator<()

template<class T>
int unit< T >::operator< ( const unit< T > & u) const
inline

Comparaison de type.

\ ENTREE < CACHE < SORTIE

Definition at line 163 of file unit.h.

References _t, and unit().

◆ operator<=()

template<class T>
int unit< T >::operator<= ( const unit< T > & u) const
inline

Definition at line 175 of file unit.h.

References _t, and unit().

◆ operator=()

template<class T>
unit< T > & unit< T >::operator= ( const unit< T > & u)

References unit().

◆ operator==()

template<class T>
int unit< T >::operator== ( const unit< T > & u) const
inline

Egalité de nom, position, type, biais.

Definition at line 149 of file unit.h.

References _bi, _nm, _t, _x, _y, _z, and unit().

◆ operator>()

template<class T>
int unit< T >::operator> ( const unit< T > & u) const
inline

Definition at line 169 of file unit.h.

References _t, and unit().

◆ operator>=()

template<class T>
int unit< T >::operator>= ( const unit< T > & u) const
inline

Definition at line 181 of file unit.h.

References _t, and unit().

◆ operator^()

template<class T>
unit< T > & unit< T >::operator^ ( const unit< T > & u)

References unit().

◆ set()

template<class T>
void unit< T >::set ( const char * nom,
int typ,
int xx,
int yy,
int zz,
T bia,
T sor )

Fixe tous les champs à la fois.

Referenced by unit().

◆ set_bi()

template<class T>
void unit< T >::set_bi ( T bia)
inline

Fixe le biais.

Definition at line 113 of file unit.h.

References _bi.

◆ set_coord()

template<class T>
void unit< T >::set_coord ( int xx,
int yy,
int zz )

Fixe les coordonnées.

◆ set_nm()

template<class T>
void unit< T >::set_nm ( const char * nom)

Fixe le nom du neurone.

◆ set_o()

template<class T>
void unit< T >::set_o ( T sor)
inline

Fixe l'état de sortie.

Definition at line 115 of file unit.h.

References _o.

◆ set_t()

template<class T>
void unit< T >::set_t ( int typ)

Fixe le type de neurone.

\ Les types possibles sont :\ ENTREE, CACHE, SORTIE.

◆ t()

template<class T>
int unit< T >::t ( ) const
inline

Type de neurone.

Definition at line 89 of file unit.h.

References _t.

◆ x()

template<class T>
int unit< T >::x ( ) const
inline

Position x.

Definition at line 93 of file unit.h.

References _x.

◆ y()

template<class T>
int unit< T >::y ( ) const
inline

Position y.

Definition at line 95 of file unit.h.

References _y.

◆ z()

template<class T>
int unit< T >::z ( ) const
inline

Position z.

Definition at line 97 of file unit.h.

References _z.

Member Data Documentation

◆ _bi

template<class T>
T unit< T >::_bi
protected

Champ biais.

Definition at line 133 of file unit.h.

Referenced by bi(), operator!=(), operator==(), and set_bi().

◆ _nm

template<class T>
char unit< T >::_nm[12]
protected

Champ nom.

Definition at line 131 of file unit.h.

Referenced by nm(), operator!=(), and operator==().

◆ _o

template<class T>
T unit< T >::_o
protected

Champ sortie.

Definition at line 137 of file unit.h.

Referenced by o(), and set_o().

◆ _t

template<class T>
int unit< T >::_t
protected

Champ type.

Definition at line 135 of file unit.h.

Referenced by operator!=(), operator<(), operator<=(), operator==(), operator>(), operator>=(), and t().

◆ _x

template<class T>
int unit< T >::_x
protected

Champs coordonnées.

Definition at line 139 of file unit.h.

Referenced by operator!=(), operator==(), and x().

◆ _y

template<class T>
int unit< T >::_y
protected

Definition at line 141 of file unit.h.

Referenced by operator!=(), operator==(), and y().

◆ _z

template<class T>
int unit< T >::_z
protected

Definition at line 143 of file unit.h.

Referenced by operator!=(), operator==(), and z().


The documentation for this class was generated from the following file: