Skip blank lines in dx1 file
[linguistica.git] / DCNnetwork.h
blobbe29538dc59de2d6a20c309abfa2aaf733234add
1 // Network type for stress discovery with Dynamic Computational Networks
2 // Copyright © 2009 The University of Chicago
3 #include <QLabel>
5 // See the learning documentation in DCNlearning.h for an overview.
7 #ifndef NETWORK_H
8 #define NETWORK_H
10 class grammar;
11 class QString;
12 class QLabel;
14 /**
15 * A network is a DCN that takes a grammar and puts it
16 * in equilibrium. The network is represented as an array
17 * of nodes, each node being type float. The number of nodes
18 * correspondes to the number of syllables in the word (syl).
19 * A network can output the stress of the word with getStress().
21 class network
24 private:
25 int syl;
26 bool converged;
27 float* node;
28 grammar* theGrammar;
31 public:
32 network(int syl);
33 virtual ~network();
35 void setGrammar(grammar* theGrammar);
36 void equilibrium();
37 void print(QLabel* label);
38 QString getStress();
39 bool isConverged() { return converged; }
43 #endif // NETWORK_H