1 // Implementation of grammar methods
2 // Copyright © 2009 The University of Chicago
3 #include "DCNgrammar.h"
7 //////////////////////////////////////////////////////////////////////
8 // Construction/Destruction
9 //////////////////////////////////////////////////////////////////////
15 grammar::grammar(grammar
&theGrammar
)
17 alpha
= theGrammar
.getAlpha();
18 beta
= theGrammar
.getBeta();
19 I
= theGrammar
.getI();
20 F
= theGrammar
.getF();
21 P
= theGrammar
.getP();
22 bias
= theGrammar
.getBias();
26 void grammar::setValues(float alpha
, float beta
, float I
, float F
, float P
, float bias
)
36 void grammar::print(QLabel
*label
)
39 QString partialString
;
41 partialString
.setNum(alpha
);
42 totalString
= "alpha:\t\t" + partialString
+ '\n';
43 partialString
.setNum(beta
);
44 totalString
+= "beta:\t\t" + partialString
+ '\n';
45 partialString
.setNum(I
);
46 totalString
+= "initial:\t\t" + partialString
+ '\n';
47 partialString
.setNum(F
);
48 totalString
+= "final:\t\t" + partialString
+ '\n';
49 partialString
.setNum(P
);
50 totalString
+= "penult:\t\t" + partialString
+ '\n';
51 partialString
.setNum(bias
);
52 totalString
+= "bias:\t\t" + partialString
+ '\n';
54 label
->setText(totalString
);