fix tabbing
authorbdemsky <bdemsky@uci.edu>
Sat, 13 Oct 2018 02:21:19 +0000 (19:21 -0700)
committerbdemsky <bdemsky@uci.edu>
Sat, 13 Oct 2018 02:21:19 +0000 (19:21 -0700)
src/ASTTransform/varorderingopt.cc
src/ASTTransform/varorderingopt.h
src/Backend/satencoder.h
src/Tuner/tunable.h
src/csolver.cc
src/csolver.h

index 41f3edb..52beda9 100644 (file)
@@ -4,10 +4,10 @@
  * and open the template in the editor.
  */
 
-/* 
+/*
  * File:   VarOrderingOpt.cpp
  * Author: hamed
- * 
+ *
  * Created on October 11, 2018, 5:31 PM
  */
 
 #include "elementencoding.h"
 #include "element.h"
 
-VarOrderingOpt::VarOrderingOpt(CSolver *_solver, SATEncoder *_satencoder): Transform(_solver){
+VarOrderingOpt::VarOrderingOpt(CSolver *_solver, SATEncoder *_satencoder) : Transform(_solver) {
        satencoder = _satencoder;
 }
 
 VarOrderingOpt::~VarOrderingOpt() {
 }
 
-void VarOrderingOpt::doTransform(){
+void VarOrderingOpt::doTransform() {
        BooleanVarOrdering direction = (BooleanVarOrdering)solver->getTuner()->getTunable(VARIABLEORDER, &boolVarOrderingDesc);
-       if ( direction == CONSTRAINTORDERING ){
+       if ( direction == CONSTRAINTORDERING ) {
                return;
        }
-       
+
        uint size = solver->allElements.getSize();
-       if(direction == CHORONOLOGICALORDERING){
+       if (direction == CHORONOLOGICALORDERING) {
                for (uint i = 0; i < size; i++) {
                        Element *el = solver->allElements.get(i);
                        ElementEncoding *encoding = el->getElementEncoding();
@@ -40,8 +40,8 @@ void VarOrderingOpt::doTransform(){
                                continue;
                        satencoder->encodeElementSATEncoder(el);
                }
-       }else{
-               for (int i = size-1; i>0; i--) {
+       } else {
+               for (int i = size - 1; i > 0; i--) {
                        Element *el = solver->allElements.get(i);
                        ElementEncoding *encoding = el->getElementEncoding();
                        if (encoding->getElementEncodingType() == ELEM_UNASSIGNED)
index efb0152..ed134d7 100644 (file)
@@ -4,7 +4,7 @@
  * and open the template in the editor.
  */
 
-/* 
+/*
  * File:   VarOrderingOpt.h
  * Author: hamed
  *
 #include "transform.h"
 
 
-class VarOrderingOpt :Transform {
+class VarOrderingOpt : Transform {
 public:
-        VarOrderingOpt(CSolver *_solver, SATEncoder *_satencoder);
-        void doTransform();
-        virtual ~VarOrderingOpt();
+       VarOrderingOpt(CSolver *_solver, SATEncoder *_satencoder);
+       void doTransform();
+       virtual ~VarOrderingOpt();
 private:
-        SATEncoder* satencoder;
+       SATEncoder *satencoder;
 };
 
-#endif /* VARORDERINGOPT_H */
+#endif/* VARORDERINGOPT_H */
 
index 827a904..0bb29f5 100644 (file)
@@ -69,7 +69,7 @@ private:
        CSolver *solver;
        BooleanToEdgeMap booledgeMap;
        VectorEdge *vector;
-        friend class VarOrderingOpt;
+       friend class VarOrderingOpt;
 };
 
 void allocElementConstraintVariables(ElementEncoding *ee, uint numVars);
index d838547..a7ab4e9 100644 (file)
@@ -44,8 +44,8 @@ static TunableDesc NodeEncodingDesc(ELEM_UNASSIGNED, BINARYINDEX, ELEM_UNASSIGNE
 static TunableDesc NaiveEncodingDesc(ONEHOT, BINARYINDEX, ONEHOT);
 static TunableDesc boolVarOrderingDesc(CONSTRAINTORDERING, REVERSEORDERING, REVERSEORDERING);
 
-enum Tunables {DECOMPOSEORDER, MUSTREACHGLOBAL, MUSTREACHLOCAL, MUSTREACHPRUNE, OPTIMIZEORDERSTRUCTURE, ORDERINTEGERENCODING, PREPROCESS, NODEENCODING, EDGEENCODING, MUSTEDGEPRUNE, ELEMENTOPT, 
-        ENCODINGGRAPHOPT, ELEMENTOPTSETS, PROXYVARIABLE, MUSTVALUE, NAIVEENCODER, VARIABLEORDER};
+enum Tunables {DECOMPOSEORDER, MUSTREACHGLOBAL, MUSTREACHLOCAL, MUSTREACHPRUNE, OPTIMIZEORDERSTRUCTURE, ORDERINTEGERENCODING, PREPROCESS, NODEENCODING, EDGEENCODING, MUSTEDGEPRUNE, ELEMENTOPT,
+                                                        ENCODINGGRAPHOPT, ELEMENTOPTSETS, PROXYVARIABLE, MUSTVALUE, NAIVEENCODER, VARIABLEORDER};
 typedef enum Tunables Tunables;
 
 const char *tunableParameterToString(Tunables tunable);
index a8ffc49..51f0943 100644 (file)
@@ -625,10 +625,10 @@ int CSolver::solve() {
 
        VarOrderingOpt bor(this, satEncoder);
        bor.doTransform();
-       
+
        time2 = getTimeNano();
        model_print("Encoding Graph Time: %f\n", (time2 - time1) / NANOSEC);
-       
+
        satEncoder->encodeAllSATEncoder(this);
        time1 = getTimeNano();
 
index 1bc2476..16937dd 100644 (file)
@@ -222,7 +222,7 @@ private:
        long long elapsedTime;
        long satsolverTimeout;
        friend class ElementOpt;
-        friend class VarOrderingOpt;
+       friend class VarOrderingOpt;
 };
 
 inline CompOp flipOp(CompOp op) {