algfunc.cc
来自「Gambit 是一个游戏库理论软件」· CC 代码 · 共 1,541 行 · 第 1/4 页
CC
1,541 行
BYREF)); FuncObj->SetParamInfo(1, 7, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); FuncObj->SetParamInfo(1, 8, gclParameter("cliques", porBOOLEAN, new BoolPortion(false))); gsm->AddFunction(FuncObj); FuncObj = new gclFunction(*gsm, "EnumPureSolve", 2); FuncObj->SetFuncInfo(0, gclSignature(GSM_EnumPure_Nfg, PortionSpec(porMIXED, 1), 5)); FuncObj->SetParamInfo(0, 0, gclParameter("support", porNFSUPPORT)); FuncObj->SetParamInfo(0, 1, gclParameter("stopAfter", porINTEGER, new NumberPortion(0))); FuncObj->SetParamInfo(0, 2, gclParameter("time", porNUMBER, new NumberPortion(0.0), BYREF)); FuncObj->SetParamInfo(0, 3, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(0, 4, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); FuncObj->SetFuncInfo(1, gclSignature(GSM_EnumPure_Efg, PortionSpec(porBEHAV, 1), 7)); FuncObj->SetParamInfo(1, 0, gclParameter("support", porEFSUPPORT)); FuncObj->SetParamInfo(1, 1, gclParameter("asNfg", porBOOLEAN, new BoolPortion(false))); FuncObj->SetParamInfo(1, 2, gclParameter("stopAfter", porINTEGER, new NumberPortion(0))); FuncObj->SetParamInfo(1, 3, gclParameter("precision", porPRECISION, new PrecisionPortion(precDOUBLE))); FuncObj->SetParamInfo(1, 4, gclParameter("time", porNUMBER, new NumberPortion(0.0), BYREF)); FuncObj->SetParamInfo(1, 5, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(1, 6, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); gsm->AddFunction(FuncObj); FuncObj = new gclFunction(*gsm, "QreGridSolve", 1); FuncObj->SetFuncInfo(0, gclSignature(GSM_QreGrid_Support, PortionSpec(porMIXED, 1), 15)); FuncObj->SetParamInfo(0, 0, gclParameter("support", porNFSUPPORT)); FuncObj->SetParamInfo(0, 1, gclParameter("pxifile", porTEXT, new TextPortion(""))); FuncObj->SetParamInfo(0, 2, gclParameter("minLam", porNUMBER, new NumberPortion(0.001))); FuncObj->SetParamInfo(0, 3, gclParameter("maxLam", porNUMBER, new NumberPortion(500.0))); FuncObj->SetParamInfo(0, 4, gclParameter("delLam", porNUMBER, new NumberPortion(0.02))); FuncObj->SetParamInfo(0, 5, gclParameter("powLam", porINTEGER, new NumberPortion(1))); FuncObj->SetParamInfo(0, 6, gclParameter("fullGraph", porBOOLEAN, new BoolPortion(false))); FuncObj->SetParamInfo(0, 7, gclParameter("delp1", porNUMBER, new NumberPortion(.1))); FuncObj->SetParamInfo(0, 8, gclParameter("tol1", porNUMBER, new NumberPortion(.1))); FuncObj->SetParamInfo(0, 9, gclParameter("delp2", porNUMBER, new NumberPortion(.01))); FuncObj->SetParamInfo(0, 10, gclParameter("tol2", porNUMBER, new NumberPortion(.01))); FuncObj->SetParamInfo(0, 11, gclParameter("nEvals", porNUMBER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(0, 12, gclParameter("time", porNUMBER, new NumberPortion(0.0), BYREF)); FuncObj->SetParamInfo(0, 13, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(0, 14, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); gsm->AddFunction(FuncObj); FuncObj = new gclFunction(*gsm, "QreSolve", 1); FuncObj->SetFuncInfo(0, gclSignature(GSM_Qre_Start, PortionSpec(porMIXED | porBEHAV, 1), 14)); FuncObj->SetParamInfo(0, 0, gclParameter("start", porMIXED | porBEHAV)); FuncObj->SetParamInfo(0, 1, gclParameter("pxifile", porTEXT, new TextPortion(""))); FuncObj->SetParamInfo(0, 2, gclParameter("minLam", porNUMBER, new NumberPortion(0.001))); FuncObj->SetParamInfo(0, 3, gclParameter("maxLam", porNUMBER, new NumberPortion(500.0))); FuncObj->SetParamInfo(0, 4, gclParameter("delLam", porNUMBER, new NumberPortion(0.02))); FuncObj->SetParamInfo(0, 5, gclParameter("powLam", porINTEGER, new NumberPortion(1))); FuncObj->SetParamInfo(0, 6, gclParameter("fullGraph", porBOOLEAN, new BoolPortion(false))); FuncObj->SetParamInfo(0, 7, gclParameter("accuracy", porNUMBER, new NumberPortion(1.0e-8))); FuncObj->SetParamInfo(0, 8, gclParameter("time", porNUMBER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(0, 9, gclParameter("nEvals", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(0, 10, gclParameter("nIters", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(0, 11, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(0, 12, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); FuncObj->SetParamInfo(0, 13, gclParameter("method", porINTEGER, new NumberPortion(0))); gsm->AddFunction(FuncObj); FuncObj = new gclFunction(*gsm, "LcpSolve", 3); FuncObj->SetFuncInfo(0, gclSignature(GSM_Lcp_Nfg, PortionSpec(porMIXED, 1), 7)); FuncObj->SetParamInfo(0, 0, gclParameter("support", porNFSUPPORT)); FuncObj->SetParamInfo(0, 1, gclParameter("stopAfter", porINTEGER, new NumberPortion(1))); FuncObj->SetParamInfo(0, 2, gclParameter("precision", porPRECISION, new PrecisionPortion(precDOUBLE))); FuncObj->SetParamInfo(0, 3, gclParameter("nPivots", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(0, 4, gclParameter("time", porNUMBER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(0, 5, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(0, 6, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); FuncObj->SetFuncInfo(1, gclSignature(GSM_Lcp_Efg, PortionSpec(porBEHAV, 1), 8)); FuncObj->SetParamInfo(1, 0, gclParameter("support", porEFSUPPORT)); FuncObj->SetParamInfo(1, 1, gclParameter("asNfg", porBOOLEAN, new BoolPortion(false))); FuncObj->SetParamInfo(1, 2, gclParameter("stopAfter", porINTEGER, new NumberPortion(1))); FuncObj->SetParamInfo(1, 3, gclParameter("precision", porPRECISION, new PrecisionPortion(precDOUBLE))); FuncObj->SetParamInfo(1, 4, gclParameter("nPivots", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(1, 5, gclParameter("time", porNUMBER, new NumberPortion(0.0), BYREF)); FuncObj->SetParamInfo(1, 6, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(1, 7, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); FuncObj->SetFuncInfo(2, gclSignature(GSM_Lcp_ListNumber, PortionSpec(porNUMBER, 1), 3)); FuncObj->SetParamInfo(2, 0, gclParameter("a", PortionSpec(porNUMBER, 2), REQUIRED, BYVAL)); FuncObj->SetParamInfo(2, 1, gclParameter("b", PortionSpec(porNUMBER, 1), REQUIRED, BYVAL)); FuncObj->SetParamInfo(2, 2, gclParameter("precision", porPRECISION, new PrecisionPortion(precDOUBLE))); gsm->AddFunction(FuncObj); FuncObj = new gclFunction(*gsm, "LiapSolve", 2); FuncObj->SetFuncInfo(0, gclSignature(GSM_Liap_Behav, PortionSpec(porBEHAV, 1), 9)); FuncObj->SetParamInfo(0, 0, gclParameter("start", porBEHAV)); FuncObj->SetParamInfo(0, 1, gclParameter("asNfg", porBOOLEAN, new BoolPortion(false))); FuncObj->SetParamInfo(0, 2, gclParameter("stopAfter", porINTEGER, new NumberPortion(1))); FuncObj->SetParamInfo(0, 3, gclParameter("nTries", porINTEGER, new NumberPortion(10))); FuncObj->SetParamInfo(0, 4, gclParameter("accuracy", porNUMBER, new NumberPortion(1.0e-8))); FuncObj->SetParamInfo(0, 5, gclParameter("time", porNUMBER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(0, 6, gclParameter("nEvals", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(0, 7, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(0, 8, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); FuncObj->SetFuncInfo(1, gclSignature(GSM_Liap_Mixed, PortionSpec(porMIXED, 1), 8)); FuncObj->SetParamInfo(1, 0, gclParameter("start", porMIXED)); FuncObj->SetParamInfo(1, 1, gclParameter("stopAfter", porINTEGER, new NumberPortion(1))); FuncObj->SetParamInfo(1, 2, gclParameter("nTries", porINTEGER, new NumberPortion(10))); FuncObj->SetParamInfo(1, 3, gclParameter("accuracy", porNUMBER, new NumberPortion(1.0e-8))); FuncObj->SetParamInfo(1, 4, gclParameter("time", porNUMBER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(1, 5, gclParameter("nEvals", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(1, 6, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(1, 7, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); gsm->AddFunction(FuncObj); FuncObj = new gclFunction(*gsm, "LpSolve", 3); FuncObj->SetFuncInfo(0, gclSignature(GSM_Lp_Nfg, PortionSpec(porMIXED, 1), 6)); FuncObj->SetParamInfo(0, 0, gclParameter("support", porNFSUPPORT)); FuncObj->SetParamInfo(0, 1, gclParameter("precision", porPRECISION, new PrecisionPortion(precDOUBLE))); FuncObj->SetParamInfo(0, 2, gclParameter("nPivots", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(0, 3, gclParameter("time", porNUMBER, new NumberPortion(0.0), BYREF)); FuncObj->SetParamInfo(0, 4, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(0, 5, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); FuncObj->SetFuncInfo(1, gclSignature(GSM_Lp_Efg, PortionSpec(porBEHAV, 1), 7)); FuncObj->SetParamInfo(1, 0, gclParameter("support", porEFSUPPORT)); FuncObj->SetParamInfo(1, 1, gclParameter("asNfg", porBOOLEAN, new BoolPortion(false))); FuncObj->SetParamInfo(1, 2, gclParameter("precision", porPRECISION, new PrecisionPortion(precDOUBLE))); FuncObj->SetParamInfo(1, 3, gclParameter("nPivots", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(1, 4, gclParameter("time", porNUMBER, new NumberPortion(0.0), BYREF)); FuncObj->SetParamInfo(1, 5, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(1, 6, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); FuncObj->SetFuncInfo(2, gclSignature(GSM_Lp_List, PortionSpec(porNUMBER, 1), 8)); FuncObj->SetParamInfo(2, 0, gclParameter("a", PortionSpec(porNUMBER, 2))); FuncObj->SetParamInfo(2, 1, gclParameter("b", PortionSpec(porNUMBER, 1))); FuncObj->SetParamInfo(2, 2, gclParameter("c", PortionSpec(porNUMBER, 1))); FuncObj->SetParamInfo(2, 3, gclParameter("nEqualities", porNUMBER)); FuncObj->SetParamInfo(2, 4, gclParameter("precision", porPRECISION, new PrecisionPortion(precDOUBLE))); FuncObj->SetParamInfo(2, 5, gclParameter("isFeasible", porBOOLEAN, new BoolPortion(false), BYREF)); FuncObj->SetParamInfo(2, 6, gclParameter("isBounded", porBOOLEAN, new BoolPortion(false), BYREF)); FuncObj->SetParamInfo(2, 7, gclParameter("optimalCost", porNUMBER, new NumberPortion(0), BYREF)); gsm->AddFunction(FuncObj); FuncObj = new gclFunction(*gsm, "Nfg", 1); FuncObj->SetFuncInfo(0, gclSignature(GSM_Nfg, porNFG, 2)); FuncObj->SetParamInfo(0, 0, gclParameter("efg", porEFG)); FuncObj->SetParamInfo(0, 1, gclParameter("time", porNUMBER, new NumberPortion(0), BYREF)); gsm->AddFunction(FuncObj); FuncObj = new gclFunction(*gsm, "PolEnumSolve", 2); FuncObj->SetFuncInfo(0, gclSignature(GSM_PolEnumSolve_Nfg, PortionSpec(porMIXED, 1), 8)); FuncObj->SetParamInfo(0, 0, gclParameter("support", porNFSUPPORT)); FuncObj->SetParamInfo(0, 1, gclParameter("stopAfter", porINTEGER, new NumberPortion(0))); FuncObj->SetParamInfo(0, 2, gclParameter("nEvals", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(0, 3, gclParameter("time", porNUMBER, new NumberPortion(0.0), BYREF)); FuncObj->SetParamInfo(0, 4, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(0, 5, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); FuncObj->SetParamInfo(0, 6, gclParameter("singularSupps", PortionSpec(porNFSUPPORT,1), new NfSupport_ListPortion(), BYREF)); FuncObj->SetParamInfo(0, 7, gclParameter("recurse",porBOOLEAN, new BoolPortion(true))); FuncObj->SetFuncInfo(1, gclSignature(GSM_PolEnumSolve_Efg, PortionSpec(porBEHAV, 1), 9)); FuncObj->SetParamInfo(1, 0, gclParameter("support", porEFSUPPORT)); FuncObj->SetParamInfo(1, 1, gclParameter("asNfg", porBOOLEAN, new BoolPortion(false))); FuncObj->SetParamInfo(1, 2, gclParameter("stopAfter", porINTEGER, new NumberPortion(0))); FuncObj->SetParamInfo(1, 3, gclParameter("nEvals", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(1, 4, gclParameter("time", porNUMBER, new NumberPortion(0.0), BYREF)); FuncObj->SetParamInfo(1, 5, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(1, 6, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); FuncObj->SetParamInfo(1, 7, gclParameter("singularSupps", PortionSpec(porEFSUPPORT,1), new EfSupport_ListPortion(), BYREF)); FuncObj->SetParamInfo(1, 8, gclParameter("recurse",porBOOLEAN, new BoolPortion(true))); gsm->AddFunction(FuncObj); FuncObj = new gclFunction(*gsm, "Payoff", 2); FuncObj->SetFuncInfo(0, gclSignature(GSM_Payoff_Behav, porNUMBER, 2, 0, funcLISTABLE | funcGAMEMATCH)); FuncObj->SetParamInfo(0, 0, gclParameter("profile", porBEHAV)); FuncObj->SetParamInfo(0, 1, gclParameter("player", porEFPLAYER)); FuncObj->SetFuncInfo(1, gclSignature(GSM_Payoff_Mixed, porNUMBER, 2, 0, funcLISTABLE | funcGAMEMATCH)); FuncObj->SetParamInfo(1, 0, gclParameter("profile", porMIXED)); FuncObj->SetParamInfo(1, 1, gclParameter("player", porNFPLAYER)); gsm->AddFunction(FuncObj); FuncObj = new gclFunction(*gsm, "SimpDivSolve", 2); FuncObj->SetFuncInfo(0, gclSignature(GSM_Simpdiv_Nfg, PortionSpec(porMIXED, 1), 9)); FuncObj->SetParamInfo(0, 0, gclParameter("support", porNFSUPPORT)); FuncObj->SetParamInfo(0, 1, gclParameter("stopAfter", porINTEGER, new NumberPortion(1))); FuncObj->SetParamInfo(0, 2, gclParameter("nRestarts", porINTEGER, new NumberPortion(1))); FuncObj->SetParamInfo(0, 3, gclParameter("leashLength", porINTEGER, new NumberPortion(0))); FuncObj->SetParamInfo(0, 4, gclParameter("precision", porPRECISION, new PrecisionPortion(precDOUBLE))); FuncObj->SetParamInfo(0, 5, gclParameter("nEvals", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(0, 6, gclParameter("time", porNUMBER, new NumberPortion(0.0), BYREF)); FuncObj->SetParamInfo(0, 7, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(0, 8, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); FuncObj->SetFuncInfo(1, gclSignature(GSM_Simpdiv_Efg, PortionSpec(porBEHAV, 1), 10)); FuncObj->SetParamInfo(1, 0, gclParameter("support", porEFSUPPORT)); FuncObj->SetParamInfo(1, 1, gclParameter("asNfg", porBOOLEAN, new BoolPortion(false))); FuncObj->SetParamInfo(1, 2, gclParameter("stopAfter", porINTEGER, new NumberPortion(1))); FuncObj->SetParamInfo(1, 3, gclParameter("nRestarts", porINTEGER, new NumberPortion(1))); FuncObj->SetParamInfo(1, 4, gclParameter("leashLength", porINTEGER, new NumberPortion(0))); FuncObj->SetParamInfo(1, 5, gclParameter("precision", porPRECISION, new PrecisionPortion(precDOUBLE))); FuncObj->SetParamInfo(1, 6, gclParameter("nEvals", porINTEGER, new NumberPortion(0), BYREF)); FuncObj->SetParamInfo(1, 7, gclParameter("time", porNUMBER, new NumberPortion(0.0), BYREF)); FuncObj->SetParamInfo(1, 8, gclParameter("traceFile", porOUTPUT, new OutputPortion(*new gNullOutput), BYREF)); FuncObj->SetParamInfo(1, 9, gclParameter("traceLevel", porNUMBER, new NumberPortion(0))); gsm->AddFunction(FuncObj); FuncObj = new gclFunction(*gsm, "VertEnum", 1); FuncObj->SetFuncInfo(0, gclSignature(GSM_VertEnum, PortionSpec(porNUMBER, 2), 3)); FuncObj->SetParamInfo(0, 0, gclParameter("A", PortionSpec(porNUMBER,2), REQUIRED, BYVAL)); FuncObj->SetParamInfo(0, 1, gclParameter("b", PortionSpec(porNUMBER,1), REQUIRED, BYVAL)); FuncObj->SetParamInfo(0, 2, gclParameter("precision", porPRECISION, new PrecisionPortion(precDOUBLE))); gsm->AddFunction(FuncObj);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?