MCPcopy Create free account
hub / github.com/Gecode/gecode / FlatZincSpace

Method FlatZincSpace

gecode/flatzinc/flatzinc.cpp:774–854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

772 };
773
774 FlatZincSpace::FlatZincSpace(FlatZincSpace& f)
775 : Space(f),
776 _initData(nullptr), _random(f._random),
777 _solveAnnotations(nullptr),
778 restart_data(f.restart_data),
779 iv_boolalias(nullptr),
780#ifdef GECODE_HAS_FLOAT_VARS
781 step(f.step),
782#endif
783 needAuxVars(f.needAuxVars) {
784 _optVar = f._optVar;
785 _optVarIsInt = f._optVarIsInt;
786 _method = f._method;
787 _lns = f._lns;
788 _lnsInitialSolution = f._lnsInitialSolution;
789 branchInfo = f.branchInfo;
790 iv.update(*this, f.iv);
791 iv_lns.update(*this, f.iv_lns);
792 intVarCount = f.intVarCount;
793
794 on_restart_iv.update(*this, f.on_restart_iv);
795 on_restart_bv.update(*this, f.on_restart_bv);
796#ifdef GECODE_HAS_SET_VARS
797 on_restart_sv.update(*this, f.on_restart_sv);
798#endif
799#ifdef GECODE_HAS_FLOAT_VARS
800 on_restart_fv.update(*this, f.on_restart_fv);
801#endif
802 if (needAuxVars) {
803 IntVarArgs iva;
804 for (int i=0; i<f.iv_aux.size(); i++) {
805 if (!f.iv_aux[i].assigned()) {
806 iva << IntVar();
807 iva[iva.size()-1].update(*this, f.iv_aux[i]);
808 }
809 }
810 iv_aux = IntVarArray(*this, iva);
811 }
812
813 bv.update(*this, f.bv);
814 boolVarCount = f.boolVarCount;
815 if (needAuxVars) {
816 BoolVarArgs bva;
817 for (int i=0; i<f.bv_aux.size(); i++) {
818 if (!f.bv_aux[i].assigned()) {
819 bva << BoolVar();
820 bva[bva.size()-1].update(*this, f.bv_aux[i]);
821 }
822 }
823 bv_aux = BoolVarArray(*this, bva);
824 }
825
826#ifdef GECODE_HAS_SET_VARS
827 sv.update(*this, f.sv);
828 setVarCount = f.setVarCount;
829 if (needAuxVars) {
830 SetVarArgs sva;
831 for (int i=0; i<f.sv_aux.size(); i++) {

Callers

nothing calls this directly

Calls 12

IntVarClass · 0.50
IntVarArrayClass · 0.50
BoolVarClass · 0.50
BoolVarArrayClass · 0.50
SetVarClass · 0.50
SetVarArrayClass · 0.50
FloatVarClass · 0.50
FloatVarArrayClass · 0.50
updateMethod · 0.45
sizeMethod · 0.45
assignedMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected