using vartunable instead of tunable
authorHamed Gorjiara <hgorjiar@uci.edu>
Tue, 19 Nov 2019 09:30:09 +0000 (01:30 -0800)
committerHamed Gorjiara <hgorjiar@uci.edu>
Tue, 19 Nov 2019 09:30:09 +0000 (01:30 -0800)
src/Test/serializestatictuner.cc

index 0813706..9811865 100644 (file)
@@ -15,13 +15,23 @@ int main(int argc, char **argv) {
                elem_bin->setTunable(ELEMENTOPT, &onoff, 1);
                elem_bin->setTunable(ELEMENTOPTSETS, &onoff, 1);
                elem_bin->setTunable(ENCODINGGRAPHOPT, &offon, 0);
-               elem_bin->setTunable(NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED);
+               elem_bin->setVarTunable(0, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED);
+               elem_bin->setVarTunable(1, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED);
+               elem_bin->setVarTunable(2, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED);
                elem_bin->setTunable(VARIABLEORDER, &boolVarOrderingDesc, REVERSEORDERING);
                elem_bin->setTunable(PROXYVARIABLE, &proxyparameter, 2);
-               elem_bin->setTunable(MUSTREACHGLOBAL, &onoff, 1);
-                elem_bin->setTunable(MUSTREACHLOCAL, &onoff, 1);
-                elem_bin->setTunable(MUSTREACHPRUNE, &onoff, 1);
-                elem_bin->setTunable(MUSTEDGEPRUNE, &onoff, 1);
+               elem_bin->setVarTunable(0, MUSTREACHGLOBAL, &onoff, 1);
+               elem_bin->setVarTunable(1, MUSTREACHGLOBAL, &onoff, 1);
+               elem_bin->setVarTunable(2, MUSTREACHGLOBAL, &onoff, 1);
+                elem_bin->setVarTunable(0, MUSTREACHLOCAL, &onoff, 1);
+                elem_bin->setVarTunable(1, MUSTREACHLOCAL, &onoff, 1);
+                elem_bin->setVarTunable(2, MUSTREACHLOCAL, &onoff, 1);
+                elem_bin->setVarTunable(0, MUSTREACHPRUNE, &onoff, 1);
+                elem_bin->setVarTunable(1, MUSTREACHPRUNE, &onoff, 1);
+                elem_bin->setVarTunable(2, MUSTREACHPRUNE, &onoff, 1);
+                elem_bin->setVarTunable(0, MUSTEDGEPRUNE, &onoff, 1);
+                elem_bin->setVarTunable(1, MUSTEDGEPRUNE, &onoff, 1);
+                elem_bin->setVarTunable(2, MUSTEDGEPRUNE, &onoff, 1);
                 elem_bin->setTunable(OPTIMIZEORDERSTRUCTURE, &onoff, 1);
                 elem_bin->setTunable(MUSTVALUE, &mustValueBinaryIndex, 3);
 
@@ -78,13 +88,23 @@ int main(int argc, char **argv) {
                 elem_bin->setTunable(ELEMENTOPT, &onoff, 1);
                 elem_bin->setTunable(ELEMENTOPTSETS, &onoff, 1);
                 elem_bin->setTunable(ENCODINGGRAPHOPT, &offon, 0);
-                elem_bin->setTunable(NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED);
+               elem_bin->setVarTunable(0, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED);
+                elem_bin->setVarTunable(1, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED);
+                elem_bin->setVarTunable(2, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED);
                 elem_bin->setTunable(VARIABLEORDER, &boolVarOrderingDesc, REVERSEORDERING);
                 elem_bin->setTunable(PROXYVARIABLE, &proxyparameter, 2);
-                elem_bin->setTunable(MUSTREACHGLOBAL, &onoff, 1);
-                elem_bin->setTunable(MUSTREACHLOCAL, &onoff, 1);
-                elem_bin->setTunable(MUSTREACHPRUNE, &onoff, 1);
-                elem_bin->setTunable(MUSTEDGEPRUNE, &onoff, 1);
+                elem_bin->setVarTunable(0, MUSTREACHGLOBAL, &onoff, 1);
+                elem_bin->setVarTunable(1, MUSTREACHGLOBAL, &onoff, 1);
+                elem_bin->setVarTunable(2, MUSTREACHGLOBAL, &onoff, 1);
+                elem_bin->setVarTunable(0, MUSTREACHLOCAL, &onoff, 1);
+                elem_bin->setVarTunable(1, MUSTREACHLOCAL, &onoff, 1);
+                elem_bin->setVarTunable(2, MUSTREACHLOCAL, &onoff, 1);
+                elem_bin->setVarTunable(0, MUSTREACHPRUNE, &onoff, 1);
+                elem_bin->setVarTunable(1, MUSTREACHPRUNE, &onoff, 1);
+                elem_bin->setVarTunable(2, MUSTREACHPRUNE, &onoff, 1);
+                elem_bin->setVarTunable(0, MUSTEDGEPRUNE, &onoff, 1);
+                elem_bin->setVarTunable(1, MUSTEDGEPRUNE, &onoff, 1);
+                elem_bin->setVarTunable(2, MUSTEDGEPRUNE, &onoff, 1);
                 elem_bin->setTunable(OPTIMIZEORDERSTRUCTURE, &onoff, 1);
                elem_onehot->setTunable(ORDERINTEGERENCODING, &offon, 1);
                elem_unary->setTunable(ORDERINTEGERENCODING, &offon, 1);