query stringlengths 9 9.05k | document stringlengths 10 222k | metadata dict | negatives listlengths 30 30 | negative_scores listlengths 30 30 | document_score stringlengths 4 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
Changes the bounds of a list of variables. putvarboundlist(self,sub_,bkx_,blx_,bux_) | def putvarboundlist(self,sub_,bkx_,blx_,bux_):
num_ = None
if num_ is None:
num_ = len(sub_)
elif num_ != len(sub_):
raise IndexError("Inconsistent length of array sub")
if num_ is None:
num_ = len(bkx_)
elif num_ != len(bkx_):
raise IndexError("Inconsistent length of array b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putvarboundlistconst(self,sub_,bkx_,blx_,bux_):\n num_ = None\n if num_ is None:\n num_ = len(sub_)\n elif num_ != len(sub_):\n raise IndexError(\"Inconsistent length of array sub\")\n if sub_ is None:\n raise ValueError(\"Argument sub cannot be None\")\n if sub_ is None:\n r... | [
"0.8234259",
"0.7890434",
"0.70631224",
"0.6849752",
"0.6744828",
"0.6431723",
"0.6421552",
"0.64171445",
"0.641259",
"0.6356358",
"0.6287844",
"0.606733",
"0.60325545",
"0.5835947",
"0.5711706",
"0.56917834",
"0.5684577",
"0.5666441",
"0.56318825",
"0.5488267",
"0.54620206",... | 0.8044877 | 1 |
Changes the bounds of a list of variables. putvarboundlistconst(self,sub_,bkx_,blx_,bux_) | def putvarboundlistconst(self,sub_,bkx_,blx_,bux_):
num_ = None
if num_ is None:
num_ = len(sub_)
elif num_ != len(sub_):
raise IndexError("Inconsistent length of array sub")
if sub_ is None:
raise ValueError("Argument sub cannot be None")
if sub_ is None:
raise ValueError("A... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putvarboundlist(self,sub_,bkx_,blx_,bux_):\n num_ = None\n if num_ is None:\n num_ = len(sub_)\n elif num_ != len(sub_):\n raise IndexError(\"Inconsistent length of array sub\")\n if num_ is None:\n num_ = len(bkx_)\n elif num_ != len(bkx_):\n raise IndexError(\"Inconsistent ... | [
"0.7802839",
"0.74736947",
"0.7351789",
"0.71760994",
"0.68241155",
"0.65913326",
"0.65883243",
"0.6351352",
"0.63493115",
"0.62824434",
"0.62661535",
"0.6100925",
"0.60384923",
"0.59712017",
"0.58503205",
"0.5785788",
"0.57782364",
"0.5726529",
"0.5715237",
"0.5681339",
"0.5... | 0.8611551 | 0 |
Changes the bounds for a slice of the variables. putvarboundsliceconst(self,first_,last_,bkx_,blx_,bux_) | def putvarboundsliceconst(self,first_,last_,bkx_,blx_,bux_):
res = __library__.MSK_XX_putvarboundsliceconst(self.__nativep,first_,last_,bkx_,blx_,bux_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putvarboundslice(self,first_,last_,bk,bl,bu): # 3\n if bk is None: raise TypeError(\"Invalid type for argument bk\")\n if bk is None:\n bk_ = None\n else:\n try:\n bk_ = memoryview(bk)\n except TypeError:\n try:\n _tmparr_bk = array.array(\"i\",b... | [
"0.78326833",
"0.7734105",
"0.7384246",
"0.73374903",
"0.7264578",
"0.676517",
"0.6706333",
"0.65771973",
"0.6273341",
"0.6261887",
"0.62256247",
"0.6213124",
"0.61776054",
"0.6171745",
"0.6162715",
"0.61598974",
"0.61103725",
"0.6071546",
"0.601926",
"0.6003408",
"0.58926064... | 0.89807767 | 0 |
Replaces the fixed term in the objective. putcfix(self,cfix_) | def putcfix(self,cfix_):
res = __library__.MSK_XX_putcfix(self.__nativep,cfix_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putcfix(self,cfix_): # 3\n res = self.__obj.putcfix(cfix_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def fixC(self,i,value):\n if self.coeffPattern[2] == None:\n m,n=self.m,self.n\n self.coeffPattern[2] = [No... | [
"0.708022",
"0.6352814",
"0.5975144",
"0.58999455",
"0.5676646",
"0.5464873",
"0.53494346",
"0.5349058",
"0.5343659",
"0.53432745",
"0.53168523",
"0.52869856",
"0.5279766",
"0.5264671",
"0.51587206",
"0.5142443",
"0.5114193",
"0.51119894",
"0.5060143",
"0.5042062",
"0.5015368... | 0.69024557 | 1 |
Modifies one linear coefficient in the objective. putcj(self,j_,cj_) | def putcj(self,j_,cj_):
res = __library__.MSK_XX_putcj(self.__nativep,j_,cj_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putcj(self,j_,cj_): # 3\n res = self.__obj.putcj(j_,cj_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def jacobian(self, c):\n\n raise NotImplementedError",
"def getcj(self,j_): # 3\n res,resargs = self.__obj.getcj(j_)\n ... | [
"0.71400785",
"0.6213591",
"0.61696875",
"0.6164791",
"0.60605234",
"0.59805757",
"0.58748615",
"0.57106733",
"0.5628812",
"0.56003463",
"0.55685896",
"0.5553388",
"0.5516792",
"0.5434863",
"0.5434863",
"0.5425381",
"0.540043",
"0.5388786",
"0.5384671",
"0.53840244",
"0.53762... | 0.70735407 | 1 |
Sets the objective sense. putobjsense(self,sense_) | def putobjsense(self,sense_):
res = __library__.MSK_XX_putobjsense(self.__nativep,sense_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putobjsense(self,sense_): # 3\n if not isinstance(sense_,objsense): raise TypeError(\"Argument sense has wrong type\")\n res = self.__obj.putobjsense(sense_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def objective(self, objective):\... | [
"0.79471225",
"0.52841735",
"0.5171148",
"0.5096876",
"0.50680315",
"0.48795915",
"0.48363435",
"0.48355487",
"0.48335677",
"0.48176384",
"0.47935885",
"0.47814864",
"0.4768401",
"0.47334376",
"0.4723602",
"0.469889",
"0.46933207",
"0.46930823",
"0.4692844",
"0.46748367",
"0.... | 0.75217026 | 1 |
Gets the objective sense. getobjsense(self) | def getobjsense(self):
sense_ = ctypes.c_int32()
res = __library__.MSK_XX_getobjsense(self.__nativep,ctypes.byref(sense_))
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg)
_sense_return_value = objsense(sense_.value)
return (_sense_return_value) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getobjsense(self): # 3\n res,resargs = self.__obj.getobjsense()\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)\n _sense_return_value = resargs\n _sense_return_value = objsense(_sense_return_value)\n return _sense_return_value",
"d... | [
"0.8077817",
"0.6475919",
"0.62005496",
"0.62005496",
"0.62005496",
"0.61305094",
"0.6124314",
"0.6089001",
"0.5931077",
"0.58792186",
"0.5827234",
"0.58187944",
"0.57927275",
"0.5724244",
"0.57183784",
"0.5676843",
"0.56714916",
"0.5586467",
"0.5586467",
"0.5586467",
"0.5568... | 0.73985374 | 1 |
Modifies a part of the linear objective coefficients. putclist(self,subj_,val_) | def putclist(self,subj_,val_):
num_ = None
if num_ is None:
num_ = len(subj_)
elif num_ != len(subj_):
raise IndexError("Inconsistent length of array subj")
if num_ is None:
num_ = len(val_)
elif num_ != len(val_):
raise IndexError("Inconsistent length of array val")
if s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putclist(self,subj,val): # 3\n num_ = None\n if num_ is None:\n num_ = len(subj)\n elif num_ != len(subj):\n raise IndexError(\"Inconsistent length of array subj\")\n if num_ is None:\n num_ = len(val)\n elif num_ != len(val):\n raise IndexError(\"Inconsiste... | [
"0.7019918",
"0.6498057",
"0.565561",
"0.55103093",
"0.5359275",
"0.53481793",
"0.5285191",
"0.5283986",
"0.5262921",
"0.5168434",
"0.5103253",
"0.50901055",
"0.50725174",
"0.5070623",
"0.50672764",
"0.5047127",
"0.49618518",
"0.49521777",
"0.49174896",
"0.4880588",
"0.487536... | 0.6732897 | 1 |
Modifies a slice of the linear objective coefficients. putcslice(self,first_,last_,slice_) | def putcslice(self,first_,last_,slice_):
_slice_minlength = ((last_) - (first_))
if ((last_) - (first_)) > 0 and slice_ is not None and len(slice_) != ((last_) - (first_)):
raise ValueError("Array argument slice is not long enough: Is %d, expected %d" % (len(slice_),((last_) - (first_))))
if slice_ is... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putcslice(self,first_,last_,slice): # 3\n if slice is None: raise TypeError(\"Invalid type for argument slice\")\n if slice is None:\n slice_ = None\n else:\n try:\n slice_ = memoryview(slice)\n except TypeError:\n try:\n _tmparr_slice = array.ar... | [
"0.7177398",
"0.64559644",
"0.64415175",
"0.6327401",
"0.63102835",
"0.62641084",
"0.6245864",
"0.6206491",
"0.61138916",
"0.60814995",
"0.597995",
"0.593315",
"0.5893596",
"0.58712506",
"0.5860539",
"0.5855395",
"0.58295006",
"0.58105403",
"0.5787265",
"0.5746839",
"0.570190... | 0.73769736 | 0 |
Changes one element in barc. putbarcj(self,j_,sub_,weights_) | def putbarcj(self,j_,sub_,weights_):
num_ = None
if num_ is None:
num_ = len(sub_)
elif num_ != len(sub_):
raise IndexError("Inconsistent length of array sub")
if num_ is None:
num_ = len(weights_)
elif num_ != len(weights_):
raise IndexError("Inconsistent length of array wei... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putbarcj(self,j_,sub,weights): # 3\n num_ = None\n if num_ is None:\n num_ = len(sub)\n elif num_ != len(sub):\n raise IndexError(\"Inconsistent length of array sub\")\n if num_ is None:\n num_ = len(weights)\n elif num_ != len(weights):\n raise IndexError(\... | [
"0.8175987",
"0.73748964",
"0.7216971",
"0.62823015",
"0.62727207",
"0.6010744",
"0.58721524",
"0.5819966",
"0.57759297",
"0.5744071",
"0.56815547",
"0.5676308",
"0.55539197",
"0.54821527",
"0.53647524",
"0.53490466",
"0.52245176",
"0.52084583",
"0.5198786",
"0.5183286",
"0.5... | 0.77634215 | 1 |
Replaces a conic constraint. putcone(self,k_,ct_,conepar_,submem_) | def putcone(self,k_,ct_,conepar_,submem_):
nummem_ = None
if nummem_ is None:
nummem_ = len(submem_)
elif nummem_ != len(submem_):
raise IndexError("Inconsistent length of array submem")
if submem_ is None:
raise ValueError("Argument submem cannot be None")
if submem_ is None:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putcone(self,k_,ct_,conepar_,submem): # 3\n if not isinstance(ct_,conetype): raise TypeError(\"Argument ct has wrong type\")\n nummem_ = None\n if nummem_ is None:\n nummem_ = len(submem)\n elif nummem_ != len(submem):\n raise IndexError(\"Inconsistent length of array submem\"... | [
"0.79132587",
"0.65889823",
"0.6287175",
"0.60342395",
"0.58452046",
"0.584365",
"0.54893136",
"0.53622764",
"0.5344895",
"0.52238137",
"0.5210514",
"0.50818294",
"0.50687397",
"0.5066322",
"0.5015226",
"0.50098133",
"0.4991474",
"0.49618068",
"0.49253765",
"0.4921023",
"0.48... | 0.78817594 | 1 |
Appends a general sparse symmetric matrix to the storage of symmetric matrices. appendsparsesymmat(self,dim_,subi_,subj_,valij_) | def appendsparsesymmat(self,dim_,subi_,subj_,valij_):
nz_ = None
if nz_ is None:
nz_ = len(subi_)
elif nz_ != len(subi_):
raise IndexError("Inconsistent length of array subi")
if nz_ is None:
nz_ = len(subj_)
elif nz_ != len(subj_):
raise IndexError("Inconsistent length of ar... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def appendsparsesymmat(self,dim_,subi,subj,valij): # 3\n nz_ = None\n if nz_ is None:\n nz_ = len(subi)\n elif nz_ != len(subi):\n raise IndexError(\"Inconsistent length of array subi\")\n if nz_ is None:\n nz_ = len(subj)\n elif nz_ != len(subj):\n raise IndexE... | [
"0.7391125",
"0.6855938",
"0.64830375",
"0.6458727",
"0.54127806",
"0.5294181",
"0.51218337",
"0.5078287",
"0.5072397",
"0.5031775",
"0.5025988",
"0.50101835",
"0.50026613",
"0.49249858",
"0.49118322",
"0.48946965",
"0.4886756",
"0.4860377",
"0.48591778",
"0.4854623",
"0.4850... | 0.7588713 | 0 |
Appends a general sparse symmetric matrix to the storage of symmetric matrices. appendsparsesymmatlist(self,dims_,nz_,subi_,subj_,valij_,idx_) | def appendsparsesymmatlist(self,dims_,nz_,subi_,subj_,valij_,idx_):
num_ = None
if num_ is None:
num_ = len(dims_)
elif num_ != len(dims_):
raise IndexError("Inconsistent length of array dims")
if num_ is None:
num_ = len(nz_)
elif num_ != len(nz_):
raise IndexError("Inconsis... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def appendsparsesymmat(self,dim_,subi_,subj_,valij_):\n nz_ = None\n if nz_ is None:\n nz_ = len(subi_)\n elif nz_ != len(subi_):\n raise IndexError(\"Inconsistent length of array subi\")\n if nz_ is None:\n nz_ = len(subj_)\n elif nz_ != len(subj_):\n raise IndexError(\"Inconsis... | [
"0.70590025",
"0.6795725",
"0.63318455",
"0.6023266",
"0.52935266",
"0.5206711",
"0.5191596",
"0.5079819",
"0.49437016",
"0.49408752",
"0.4925097",
"0.4889433",
"0.4782237",
"0.4736962",
"0.4685731",
"0.467853",
"0.46744376",
"0.46646318",
"0.46621722",
"0.46508092",
"0.46442... | 0.74942684 | 0 |
Obtains information about a matrix from the symmetric matrix storage. getsymmatinfo(self,idx_) | def getsymmatinfo(self,idx_):
dim_ = ctypes.c_int32()
nz_ = ctypes.c_int64()
type_ = ctypes.c_int32()
res = __library__.MSK_XX_getsymmatinfo(self.__nativep,idx_,ctypes.byref(dim_),ctypes.byref(nz_),ctypes.byref(type_))
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getsymmatinfo(self,idx_): # 3\n res,resargs = self.__obj.getsymmatinfo(idx_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)\n _dim_return_value,_nz_return_value,_type_return_value = resargs\n _type_return_value = symmattype(_type_return_... | [
"0.8472209",
"0.61438686",
"0.60188043",
"0.59274673",
"0.5842971",
"0.57795507",
"0.57204145",
"0.57204145",
"0.57204145",
"0.57204145",
"0.5698095",
"0.5413046",
"0.5405503",
"0.5376912",
"0.5374786",
"0.531883",
"0.5297684",
"0.523657",
"0.51200414",
"0.51060134",
"0.50813... | 0.8566959 | 0 |
Obtains the number of symmetric matrices stored. getnumsymmat(self) | def getnumsymmat(self):
num_ = ctypes.c_int64()
res = __library__.MSK_XX_getnumsymmat(self.__nativep,ctypes.byref(num_))
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg)
num_ = num_.value
_num_return_value = num_
return (_num_return_value) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getnumsymmat(self): # 3\n res,resargs = self.__obj.getnumsymmat()\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)\n _num_return_value = resargs\n return _num_return_value",
"def getsymmatinfo(self,idx_): # 3\n res,resargs = self.__... | [
"0.7524286",
"0.6255513",
"0.62463",
"0.6031631",
"0.5934353",
"0.58589876",
"0.5748166",
"0.5643437",
"0.5588444",
"0.5525005",
"0.551974",
"0.5482156",
"0.547971",
"0.54718024",
"0.54672223",
"0.5427831",
"0.54226774",
"0.5403771",
"0.5391538",
"0.5375537",
"0.53549564",
... | 0.7143468 | 1 |
Gets a single symmetric matrix from the matrix store. getsparsesymmat(self,idx_,subi_,subj_,valij_) | def getsparsesymmat(self,idx_,subi_,subj_,valij_):
maxlen_ = self.getsymmatinfo((idx_))[1]
_subi_minlength = (maxlen_)
if (maxlen_) > 0 and subi_ is not None and len(subi_) != (maxlen_):
raise ValueError("Array argument subi is not long enough: Is %d, expected %d" % (len(subi_),(maxlen_)))
if isin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getsparsesymmat(self,idx_,subi,subj,valij): # 3\n maxlen_ = self.getsymmatinfo((idx_))[1]\n _copyback_subi = False\n if subi is None:\n subi_ = None\n else:\n try:\n subi_ = memoryview(subi)\n except TypeError:\n try:\n _tmparr_subi = array.... | [
"0.75738734",
"0.6238482",
"0.6137533",
"0.56444985",
"0.5625718",
"0.558371",
"0.54747504",
"0.52915025",
"0.52799106",
"0.52322876",
"0.5228932",
"0.51636285",
"0.5140221",
"0.5121791",
"0.50425875",
"0.49852064",
"0.4978507",
"0.49779502",
"0.49698326",
"0.4951648",
"0.492... | 0.77381927 | 0 |
Sets an integer parameter. putintparam(self,param_,parvalue_) | def putintparam(self,param_,parvalue_):
res = __library__.MSK_XX_putintparam(self.__nativep,param_,parvalue_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putintparam(self,param_,parvalue_): # 3\n if not isinstance(param_,iparam): raise TypeError(\"Argument param has wrong type\")\n res = self.__obj.putintparam(param_,parvalue_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def getintpara... | [
"0.8837676",
"0.71326786",
"0.6860121",
"0.68544596",
"0.6800701",
"0.6800701",
"0.6740805",
"0.6733184",
"0.6618874",
"0.658969",
"0.6509817",
"0.6441833",
"0.6363545",
"0.6344362",
"0.633649",
"0.6328604",
"0.63135433",
"0.62845325",
"0.6263861",
"0.62351775",
"0.6199873",
... | 0.85035557 | 1 |
Sets the number of preallocated constraints in the optimization task. putmaxnumcon(self,maxnumcon_) | def putmaxnumcon(self,maxnumcon_):
res = __library__.MSK_XX_putmaxnumcon(self.__nativep,maxnumcon_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putmaxnumcon(self,maxnumcon_): # 3\n res = self.__obj.putmaxnumcon(maxnumcon_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def putmaxnumcone(self,maxnumcone_):\n res = __library__.MSK_XX_putmaxnumcone(self.__nativep,maxnumcone_)\n if... | [
"0.7620724",
"0.6740477",
"0.6646557",
"0.60926807",
"0.5997314",
"0.59877884",
"0.59074914",
"0.589972",
"0.5885956",
"0.57590777",
"0.5751454",
"0.5703682",
"0.5699466",
"0.56882566",
"0.5686642",
"0.568195",
"0.56570315",
"0.5625261",
"0.5607635",
"0.5532643",
"0.5513424",... | 0.73856825 | 1 |
Sets the number of preallocated conic constraints in the optimization task. putmaxnumcone(self,maxnumcone_) | def putmaxnumcone(self,maxnumcone_):
res = __library__.MSK_XX_putmaxnumcone(self.__nativep,maxnumcone_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putmaxnumcone(self,maxnumcone_): # 3\n res = self.__obj.putmaxnumcone(maxnumcone_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def putmaxnumcon(self,maxnumcon_): # 3\n res = self.__obj.putmaxnumcon(maxnumcon_)\n if res != 0:\n ... | [
"0.7859737",
"0.687435",
"0.6576984",
"0.6516009",
"0.6250021",
"0.5742838",
"0.57224095",
"0.5664653",
"0.5662323",
"0.5644606",
"0.5565795",
"0.55509084",
"0.55272174",
"0.54718906",
"0.5445443",
"0.54382503",
"0.5431226",
"0.5375135",
"0.53488725",
"0.5343298",
"0.5334908"... | 0.76632214 | 1 |
Obtains the number of preallocated cones in the optimization task. getmaxnumcone(self) | def getmaxnumcone(self):
maxnumcone_ = ctypes.c_int32()
res = __library__.MSK_XX_getmaxnumcone(self.__nativep,ctypes.byref(maxnumcone_))
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg)
maxnumcone_ = maxnumcone_.value
_maxnumcone_return_value = maxnumcone_
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getmaxnumcone(self): # 3\n res,resargs = self.__obj.getmaxnumcone()\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)\n _maxnumcone_return_value = resargs\n return _maxnumcone_return_value",
"def getnumcone(self): # 3\n res,resargs =... | [
"0.82559127",
"0.74485886",
"0.7001308",
"0.6936185",
"0.6920529",
"0.67586905",
"0.6735455",
"0.64610845",
"0.64500237",
"0.64104486",
"0.6385375",
"0.6377788",
"0.63512313",
"0.6300954",
"0.6270852",
"0.6235373",
"0.6222689",
"0.6206008",
"0.62018204",
"0.61789495",
"0.6172... | 0.7739373 | 1 |
Sets the number of preallocated variables in the optimization task. putmaxnumvar(self,maxnumvar_) | def putmaxnumvar(self,maxnumvar_):
res = __library__.MSK_XX_putmaxnumvar(self.__nativep,maxnumvar_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putmaxnumvar(self,maxnumvar_): # 3\n res = self.__obj.putmaxnumvar(maxnumvar_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def putmaxnumbarvar(self,maxnumbarvar_): # 3\n res = self.__obj.putmaxnumbarvar(maxnumbarvar_)\n if res !=... | [
"0.80868816",
"0.7560464",
"0.73389435",
"0.65560055",
"0.65400666",
"0.6336814",
"0.63105714",
"0.62413776",
"0.61817116",
"0.6158278",
"0.60976154",
"0.60662615",
"0.6011411",
"0.5994649",
"0.5986585",
"0.5917469",
"0.58999217",
"0.58730257",
"0.58647376",
"0.58646524",
"0.... | 0.76906484 | 1 |
Sets the number of preallocated symmetric matrix variables. putmaxnumbarvar(self,maxnumbarvar_) | def putmaxnumbarvar(self,maxnumbarvar_):
res = __library__.MSK_XX_putmaxnumbarvar(self.__nativep,maxnumbarvar_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putmaxnumbarvar(self,maxnumbarvar_): # 3\n res = self.__obj.putmaxnumbarvar(maxnumbarvar_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def putmaxnumvar(self,maxnumvar_): # 3\n res = self.__obj.putmaxnumvar(maxnumvar_)\n if res !=... | [
"0.7951648",
"0.6959753",
"0.6795598",
"0.65727705",
"0.6438065",
"0.6048308",
"0.5996996",
"0.5852882",
"0.5841968",
"0.5822205",
"0.5682764",
"0.5667983",
"0.5649398",
"0.5640302",
"0.5615086",
"0.56006753",
"0.55580956",
"0.5552524",
"0.5495012",
"0.54564613",
"0.5411751",... | 0.78251684 | 1 |
Sets the number of preallocated nonzero entries in the linear coefficient matrix. putmaxnumanz(self,maxnumanz_) | def putmaxnumanz(self,maxnumanz_):
res = __library__.MSK_XX_putmaxnumanz(self.__nativep,maxnumanz_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putmaxnumanz(self,maxnumanz_): # 3\n res = self.__obj.putmaxnumanz(maxnumanz_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def putmaxnumqnz(self,maxnumqnz_):\n res = __library__.MSK_XX_putmaxnumqnz(self.__nativep,maxnumqnz_)\n if res... | [
"0.7441124",
"0.68018794",
"0.66798395",
"0.6399272",
"0.6247705",
"0.61643946",
"0.6043132",
"0.59559965",
"0.57927316",
"0.57495356",
"0.57457256",
"0.56957024",
"0.5552648",
"0.5549431",
"0.5518782",
"0.55130196",
"0.55069184",
"0.54949814",
"0.53994",
"0.5381273",
"0.5353... | 0.7562487 | 0 |
Sets the number of preallocated nonzero entries in quadratic terms. putmaxnumqnz(self,maxnumqnz_) | def putmaxnumqnz(self,maxnumqnz_):
res = __library__.MSK_XX_putmaxnumqnz(self.__nativep,maxnumqnz_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putmaxnumqnz(self,maxnumqnz_): # 3\n res = self.__obj.putmaxnumqnz(maxnumqnz_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def getmaxnumqnz(self): # 3\n res,resargs = self.__obj.getmaxnumqnz64()\n if res != 0:\n result,msg... | [
"0.8385307",
"0.7157034",
"0.6808096",
"0.6252767",
"0.6003535",
"0.6001192",
"0.5939193",
"0.59272075",
"0.5830991",
"0.5783531",
"0.5719293",
"0.5708783",
"0.56221986",
"0.5621964",
"0.5618641",
"0.5608385",
"0.55962783",
"0.55303234",
"0.54971045",
"0.5450261",
"0.54395735... | 0.81725997 | 1 |
Sets a string parameter. putnastrparam(self,paramname_,parvalue_) | def putnastrparam(self,paramname_,parvalue_):
if isinstance(paramname_,unicode):
paramname_ = paramname_.encode("utf-8",errors="replace")
if isinstance(parvalue_,unicode):
parvalue_ = parvalue_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_putnastrparam(self.__nativep,paramname_,parv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putnastrparam(self,paramname_,parvalue_): # 3\n res = self.__obj.putnastrparam(paramname_,parvalue_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def putstrparam(self,param_,parvalue_): # 3\n if not isinstance(param_,sparam): raise Typ... | [
"0.900503",
"0.8041969",
"0.7825734",
"0.6532771",
"0.64951867",
"0.64323235",
"0.63091147",
"0.62664294",
"0.62081355",
"0.6152447",
"0.61227375",
"0.5890109",
"0.58600485",
"0.58454996",
"0.5755116",
"0.5754159",
"0.575312",
"0.5688754",
"0.5685935",
"0.5649547",
"0.5641109... | 0.87847257 | 1 |
Assigns a new name to the objective. putobjname(self,objname_) | def putobjname(self,objname_):
if isinstance(objname_,unicode):
objname_ = objname_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_putobjname(self.__nativep,objname_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putobjname(self,objname_): # 3\n res = self.__obj.putobjname(objname_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def set_object_name(self, object_name = \"DefaultObject\"):\n self.obj_name = object_name",
"def set_object_name(se... | [
"0.8106175",
"0.71860224",
"0.70278543",
"0.6894341",
"0.68561333",
"0.66999173",
"0.663241",
"0.6498052",
"0.6482429",
"0.64018923",
"0.6332358",
"0.63283575",
"0.6323521",
"0.6323521",
"0.6271868",
"0.62309307",
"0.6210313",
"0.6210313",
"0.62092906",
"0.61988294",
"0.61915... | 0.7715799 | 1 |
Modifies the value of parameter. putparam(self,parname_,parvalue_) | def putparam(self,parname_,parvalue_):
if isinstance(parname_,unicode):
parname_ = parname_.encode("utf-8",errors="replace")
if isinstance(parvalue_,unicode):
parvalue_ = parvalue_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_putparam(self.__nativep,parname_,parvalue_)
if res !=... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putparam(self,parname_,parvalue_): # 3\n res = self.__obj.putparam(parname_,parvalue_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def setParam(self,param,value):\n if param in self.params.keys():\n self.params[param] = v... | [
"0.89312124",
"0.8022478",
"0.7980035",
"0.7786411",
"0.77297336",
"0.75346786",
"0.746019",
"0.7395771",
"0.7331477",
"0.7268502",
"0.7261241",
"0.72502863",
"0.72311014",
"0.72027457",
"0.7178884",
"0.7141566",
"0.70621306",
"0.7020081",
"0.7006386",
"0.69946426",
"0.699218... | 0.8278058 | 1 |
Replaces all quadratic terms in constraints. putqcon(self,qcsubk_,qcsubi_,qcsubj_,qcval_) | def putqcon(self,qcsubk_,qcsubi_,qcsubj_,qcval_):
numqcnz_ = None
if numqcnz_ is None:
numqcnz_ = len(qcsubi_)
elif numqcnz_ != len(qcsubi_):
raise IndexError("Inconsistent length of array qcsubi")
if numqcnz_ is None:
numqcnz_ = len(qcsubj_)
elif numqcnz_ != len(qcsubj_):
ra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putqconk(self,k_,qcsubi_,qcsubj_,qcval_):\n numqcnz_ = None\n if numqcnz_ is None:\n numqcnz_ = len(qcsubi_)\n elif numqcnz_ != len(qcsubi_):\n raise IndexError(\"Inconsistent length of array qcsubi\")\n if numqcnz_ is None:\n numqcnz_ = len(qcsubj_)\n elif numqcnz_ != len(qcsubj_... | [
"0.7356916",
"0.7274804",
"0.7158734",
"0.66391945",
"0.6536458",
"0.5380898",
"0.5333184",
"0.5304116",
"0.52284986",
"0.52283263",
"0.5153612",
"0.5121988",
"0.50708705",
"0.50423145",
"0.4997849",
"0.49975076",
"0.49906054",
"0.49511495",
"0.4933693",
"0.4864164",
"0.48633... | 0.7487632 | 0 |
Replaces all quadratic terms in a single constraint. putqconk(self,k_,qcsubi_,qcsubj_,qcval_) | def putqconk(self,k_,qcsubi_,qcsubj_,qcval_):
numqcnz_ = None
if numqcnz_ is None:
numqcnz_ = len(qcsubi_)
elif numqcnz_ != len(qcsubi_):
raise IndexError("Inconsistent length of array qcsubi")
if numqcnz_ is None:
numqcnz_ = len(qcsubj_)
elif numqcnz_ != len(qcsubj_):
raise ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putqconk(self,k_,qcsubi,qcsubj,qcval): # 3\n numqcnz_ = None\n if numqcnz_ is None:\n numqcnz_ = len(qcsubi)\n elif numqcnz_ != len(qcsubi):\n raise IndexError(\"Inconsistent length of array qcsubi\")\n if numqcnz_ is None:\n numqcnz_ = len(qcsubj)\n elif numqcnz_ ... | [
"0.7407992",
"0.73707557",
"0.7119913",
"0.67798036",
"0.6661862",
"0.5547101",
"0.55400264",
"0.5332845",
"0.5304892",
"0.5226392",
"0.5216021",
"0.5155784",
"0.5152715",
"0.51131207",
"0.50926286",
"0.50507396",
"0.5048387",
"0.5019227",
"0.4992005",
"0.497944",
"0.49701524... | 0.76697636 | 0 |
Replaces all quadratic terms in the objective. putqobj(self,qosubi_,qosubj_,qoval_) | def putqobj(self,qosubi_,qosubj_,qoval_):
numqonz_ = None
if numqonz_ is None:
numqonz_ = len(qosubi_)
elif numqonz_ != len(qosubi_):
raise IndexError("Inconsistent length of array qosubi")
if numqonz_ is None:
numqonz_ = len(qosubj_)
elif numqonz_ != len(qosubj_):
raise Inde... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putqobj(self,qosubi,qosubj,qoval): # 3\n numqonz_ = None\n if numqonz_ is None:\n numqonz_ = len(qosubi)\n elif numqonz_ != len(qosubi):\n raise IndexError(\"Inconsistent length of array qosubi\")\n if numqonz_ is None:\n numqonz_ = len(qosubj)\n elif numqonz_ != l... | [
"0.71988887",
"0.67377245",
"0.66842896",
"0.6546956",
"0.642287",
"0.5680763",
"0.565179",
"0.5649305",
"0.5616514",
"0.55763125",
"0.536642",
"0.5291595",
"0.5255819",
"0.51279503",
"0.51187503",
"0.51012385",
"0.50656164",
"0.50490975",
"0.5015812",
"0.5012745",
"0.5003809... | 0.7221554 | 0 |
Replaces one coefficient in the quadratic term in the objective. putqobjij(self,i_,j_,qoij_) | def putqobjij(self,i_,j_,qoij_):
res = __library__.MSK_XX_putqobjij(self.__nativep,i_,j_,qoij_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putqobjij(self,i_,j_,qoij_): # 3\n res = self.__obj.putqobjij(i_,j_,qoij_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def getqobjij(self,i_,j_): # 3\n res,resargs = self.__obj.getqobjij(i_,j_)\n if res != 0:\n result,msg ... | [
"0.8022443",
"0.67813957",
"0.659472",
"0.62387276",
"0.6219436",
"0.61874425",
"0.6092477",
"0.6030711",
"0.6007447",
"0.58423615",
"0.58029187",
"0.5546479",
"0.5543163",
"0.54854363",
"0.54592514",
"0.54140776",
"0.5403207",
"0.54002947",
"0.537518",
"0.5340782",
"0.533449... | 0.78803056 | 1 |
Sets the primal and dual solution information for a single constraint. putconsolutioni(self,i_,whichsol_,sk_,x_,sl_,su_) | def putconsolutioni(self,i_,whichsol_,sk_,x_,sl_,su_):
res = __library__.MSK_XX_putconsolutioni(self.__nativep,i_,whichsol_,sk_,x_,sl_,su_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putsolutioni(self,accmode_,i_,whichsol_,sk_,x_,sl_,su_,sn_): # 3\n if not isinstance(accmode_,accmode): raise TypeError(\"Argument accmode has wrong type\")\n if not isinstance(whichsol_,soltype): raise TypeError(\"Argument whichsol has wrong type\")\n if not isinstance(sk_,stakey): raise TypeEr... | [
"0.7256664",
"0.7085556",
"0.70574284",
"0.67001754",
"0.66156536",
"0.6531177",
"0.6481275",
"0.63412815",
"0.63247937",
"0.6043454",
"0.5931599",
"0.5860473",
"0.58587015",
"0.57669955",
"0.57536566",
"0.5601438",
"0.55334353",
"0.55334353",
"0.55334353",
"0.5502079",
"0.54... | 0.8645917 | 0 |
Sets the primal and dual solution information for a single variable. putvarsolutionj(self,j_,whichsol_,sk_,x_,sl_,su_,sn_) | def putvarsolutionj(self,j_,whichsol_,sk_,x_,sl_,su_,sn_):
res = __library__.MSK_XX_putvarsolutionj(self.__nativep,j_,whichsol_,sk_,x_,sl_,su_,sn_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putsolution(self,whichsol_,skc,skx,skn,xc,xx,y,slc,suc,slx,sux,snx): # 3\n if not isinstance(whichsol_,soltype): raise TypeError(\"Argument whichsol has wrong type\")\n if skc is None:\n skc_ = None\n else:\n try:\n skc_ = memoryview(skc)\n except TypeError:\n ... | [
"0.6384697",
"0.59763306",
"0.5868142",
"0.58261186",
"0.58098394",
"0.5764213",
"0.5686661",
"0.56294215",
"0.55897075",
"0.555756",
"0.55094",
"0.54587734",
"0.5450689",
"0.5421204",
"0.5396719",
"0.5390872",
"0.53769356",
"0.53164923",
"0.52948296",
"0.52874386",
"0.524441... | 0.888349 | 0 |
Inputs the dual variable of a solution. putsolutionyi(self,i_,whichsol_,y_) | def putsolutionyi(self,i_,whichsol_,y_):
res = __library__.MSK_XX_putsolutionyi(self.__nativep,i_,whichsol_,y_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putsolutionyi(self,i_,whichsol_,y_): # 3\n if not isinstance(whichsol_,soltype): raise TypeError(\"Argument whichsol has wrong type\")\n res = self.__obj.putsolutionyi(i_,whichsol_,y_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def p... | [
"0.85774046",
"0.70034355",
"0.66922426",
"0.66091764",
"0.62563616",
"0.6108404",
"0.5998291",
"0.56189865",
"0.5569256",
"0.549024",
"0.5483207",
"0.5337774",
"0.52960414",
"0.52665466",
"0.5235813",
"0.52331036",
"0.52272004",
"0.51770955",
"0.51770955",
"0.5159293",
"0.51... | 0.81092507 | 1 |
Sets a string parameter. putstrparam(self,param_,parvalue_) | def putstrparam(self,param_,parvalue_):
if isinstance(parvalue_,unicode):
parvalue_ = parvalue_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_putstrparam(self.__nativep,param_,parvalue_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putstrparam(self,param_,parvalue_): # 3\n if not isinstance(param_,sparam): raise TypeError(\"Argument param has wrong type\")\n res = self.__obj.putstrparam(param_,parvalue_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def putnastrpa... | [
"0.8903032",
"0.79385155",
"0.78946966",
"0.6862305",
"0.6671494",
"0.6618401",
"0.66161126",
"0.65867805",
"0.64877427",
"0.64677244",
"0.6323704",
"0.6307091",
"0.62468153",
"0.6246462",
"0.6167524",
"0.616714",
"0.61054486",
"0.60639423",
"0.59956676",
"0.5957143",
"0.5952... | 0.85641146 | 1 |
Sets the variable type of one variable. putvartype(self,j_,vartype_) | def putvartype(self,j_,vartype_):
res = __library__.MSK_XX_putvartype(self.__nativep,j_,vartype_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putvartype(self,j_,vartype_): # 3\n if not isinstance(vartype_,variabletype): raise TypeError(\"Argument vartype has wrong type\")\n res = self.__obj.putvartype(j_,vartype_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def getvartype(s... | [
"0.89949",
"0.6965111",
"0.6361787",
"0.62369287",
"0.6113074",
"0.60967517",
"0.6074677",
"0.6043116",
"0.60060585",
"0.59845704",
"0.59814596",
"0.5941611",
"0.59217054",
"0.5831631",
"0.58297473",
"0.57571024",
"0.5754986",
"0.5676297",
"0.5632185",
"0.5622995",
"0.5618078... | 0.82056046 | 1 |
Sets the variable type for one or more variables. putvartypelist(self,subj_,vartype_) | def putvartypelist(self,subj_,vartype_):
num_ = None
if num_ is None:
num_ = len(subj_)
elif num_ != len(subj_):
raise IndexError("Inconsistent length of array subj")
if num_ is None:
num_ = len(vartype_)
elif num_ != len(vartype_):
raise IndexError("Inconsistent length of ar... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def putvartypelist(self,subj,vartype): # 3\n num_ = None\n if num_ is None:\n num_ = len(subj)\n elif num_ != len(subj):\n raise IndexError(\"Inconsistent length of array subj\")\n if num_ is None:\n num_ = len(vartype)\n elif num_ != len(vartype):\n raise Index... | [
"0.8250177",
"0.7224048",
"0.707309",
"0.6871811",
"0.6064735",
"0.58782834",
"0.5704154",
"0.56204504",
"0.54422724",
"0.5369249",
"0.52549726",
"0.5253745",
"0.5215147",
"0.51658744",
"0.5073383",
"0.50687295",
"0.5062825",
"0.5059147",
"0.50579226",
"0.50538254",
"0.495039... | 0.79923165 | 1 |
Reads problem data from a file. readdataformat(self,filename_,format_,compress_) | def readdataformat(self,filename_,format_,compress_):
if isinstance(filename_,unicode):
filename_ = filename_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_readdataformat(self.__nativep,filename_,format_,compress_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(resco... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def readdataformat(self,filename_,format_,compress_): # 3\n if not isinstance(format_,dataformat): raise TypeError(\"Argument format has wrong type\")\n if not isinstance(compress_,compresstype): raise TypeError(\"Argument compress has wrong type\")\n res = self.__obj.readdataformat(filename_,format... | [
"0.7553127",
"0.59015036",
"0.5858663",
"0.5723628",
"0.5667749",
"0.56350636",
"0.56292766",
"0.55843794",
"0.55843794",
"0.55649745",
"0.5564228",
"0.5543848",
"0.5543789",
"0.5518771",
"0.5512596",
"0.54900783",
"0.54300296",
"0.5406005",
"0.535901",
"0.5344803",
"0.534077... | 0.7163861 | 1 |
Reads a solution from a file. readsolution(self,whichsol_,filename_) | def readsolution(self,whichsol_,filename_):
if isinstance(filename_,unicode):
filename_ = filename_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_readsolution(self.__nativep,whichsol_,filename_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def readsolution(self,whichsol_,filename_): # 3\n if not isinstance(whichsol_,soltype): raise TypeError(\"Argument whichsol has wrong type\")\n res = self.__obj.readsolution(whichsol_,filename_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
... | [
"0.8768888",
"0.67774564",
"0.6366709",
"0.6275069",
"0.6227779",
"0.62035143",
"0.61865556",
"0.60015136",
"0.5968991",
"0.5949018",
"0.58523256",
"0.5774951",
"0.5774951",
"0.57240754",
"0.57240754",
"0.57240754",
"0.5700822",
"0.5640482",
"0.5634896",
"0.5604267",
"0.55850... | 0.8492971 | 1 |
Prints information about last file read. readsummary(self,whichstream_) | def readsummary(self,whichstream_):
res = __library__.MSK_XX_readsummary(self.__nativep,whichstream_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def readsummary(self,whichstream_): # 3\n if not isinstance(whichstream_,streamtype): raise TypeError(\"Argument whichstream has wrong type\")\n res = self.__obj.readsummary(whichstream_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def su... | [
"0.7899001",
"0.6519644",
"0.65138835",
"0.60788524",
"0.59421",
"0.59183806",
"0.5882844",
"0.5876368",
"0.57434404",
"0.5713873",
"0.5700075",
"0.557035",
"0.5532855",
"0.55146515",
"0.5475546",
"0.53840125",
"0.5378493",
"0.53440875",
"0.5329391",
"0.5329391",
"0.53114873"... | 0.74428695 | 1 |
Resizes an optimization task. resizetask(self,maxnumcon_,maxnumvar_,maxnumcone_,maxnumanz_,maxnumqnz_) | def resizetask(self,maxnumcon_,maxnumvar_,maxnumcone_,maxnumanz_,maxnumqnz_):
res = __library__.MSK_XX_resizetask(self.__nativep,maxnumcon_,maxnumvar_,maxnumcone_,maxnumanz_,maxnumqnz_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resizetask(self,maxnumcon_,maxnumvar_,maxnumcone_,maxnumanz_,maxnumqnz_): # 3\n res = self.__obj.resizetask(maxnumcon_,maxnumvar_,maxnumcone_,maxnumanz_,maxnumqnz_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def prepare_pr_optimal_model_c... | [
"0.8304745",
"0.52103585",
"0.51943374",
"0.50631404",
"0.50303227",
"0.50238323",
"0.49848595",
"0.4903367",
"0.4879516",
"0.48169866",
"0.4804174",
"0.47891757",
"0.47816435",
"0.47773397",
"0.47563007",
"0.4723178",
"0.47225302",
"0.47225302",
"0.47225302",
"0.47050464",
"... | 0.8394918 | 0 |
Checks the memory allocated by the task. checkmem(self,file_,line_) | def checkmem(self,file_,line_):
if isinstance(file_,unicode):
file_ = file_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_checkmemtask(self.__nativep,file_,line_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def checkmem(self,file_,line_): # 3\n res = self.__obj.checkmemtask(file_,line_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def _checkAvailableMemory():\n #execute free -m to get output in MB\n logging.debug(\"checking total memory\")\n... | [
"0.8956478",
"0.6172901",
"0.61476266",
"0.5966271",
"0.5839869",
"0.5747777",
"0.5662355",
"0.558952",
"0.55579066",
"0.5434767",
"0.5403096",
"0.54001987",
"0.5385859",
"0.53383994",
"0.5325104",
"0.5304694",
"0.52878374",
"0.52868325",
"0.52741265",
"0.5272602",
"0.5210603... | 0.8647315 | 1 |
Checks whether a solution is defined. solutiondef(self,whichsol_) | def solutiondef(self,whichsol_):
isdef_ = ctypes.c_int32()
res = __library__.MSK_XX_solutiondef(self.__nativep,whichsol_,ctypes.byref(isdef_))
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg)
isdef_ = isdef_.value
_isdef_return_value = isdef_
return (_isdef... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def solutiondef(self,whichsol_): # 3\n if not isinstance(whichsol_,soltype): raise TypeError(\"Argument whichsol has wrong type\")\n res,resargs = self.__obj.solutiondef(whichsol_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)\n _isdef_retu... | [
"0.82378125",
"0.7520855",
"0.7130622",
"0.6716045",
"0.65864074",
"0.6542276",
"0.65399134",
"0.65024155",
"0.64941233",
"0.6442446",
"0.64409184",
"0.64374423",
"0.6399567",
"0.6366495",
"0.6350611",
"0.6329383",
"0.6290776",
"0.62602293",
"0.61625254",
"0.61530423",
"0.615... | 0.7923763 | 1 |
Undefine a solution and free the memory it uses. deletesolution(self,whichsol_) | def deletesolution(self,whichsol_):
res = __library__.MSK_XX_deletesolution(self.__nativep,whichsol_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deletesolution(self,whichsol_): # 3\n if not isinstance(whichsol_,soltype): raise TypeError(\"Argument whichsol has wrong type\")\n res = self.__obj.deletesolution(whichsol_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def clear(self)... | [
"0.7279343",
"0.6581316",
"0.61854655",
"0.61191547",
"0.60800874",
"0.60800874",
"0.5985228",
"0.5961063",
"0.59411716",
"0.5815005",
"0.5813991",
"0.5778785",
"0.57717663",
"0.5751076",
"0.5720295",
"0.5719897",
"0.56984323",
"0.5693372",
"0.5637449",
"0.56347036",
"0.56307... | 0.7549941 | 0 |
Prints a short summary of a specified solution. onesolutionsummary(self,whichstream_,whichsol_) | def onesolutionsummary(self,whichstream_,whichsol_):
res = __library__.MSK_XX_onesolutionsummary(self.__nativep,whichstream_,whichsol_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def onesolutionsummary(self,whichstream_,whichsol_): # 3\n if not isinstance(whichstream_,streamtype): raise TypeError(\"Argument whichstream has wrong type\")\n if not isinstance(whichsol_,soltype): raise TypeError(\"Argument whichsol has wrong type\")\n res = self.__obj.onesolutionsummary(whichstr... | [
"0.8853265",
"0.8302041",
"0.81137526",
"0.6555255",
"0.6380672",
"0.6087827",
"0.60587895",
"0.60307497",
"0.6008222",
"0.5991637",
"0.59595245",
"0.5958175",
"0.59552217",
"0.5938021",
"0.5918894",
"0.58800006",
"0.58726686",
"0.58662325",
"0.5847555",
"0.5815037",
"0.57407... | 0.86803454 | 1 |
Prints a short summary of the current solutions. solutionsummary(self,whichstream_) | def solutionsummary(self,whichstream_):
res = __library__.MSK_XX_solutionsummary(self.__nativep,whichstream_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def solutionsummary(self,whichstream_): # 3\n if not isinstance(whichstream_,streamtype): raise TypeError(\"Argument whichstream has wrong type\")\n res = self.__obj.solutionsummary(whichstream_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
... | [
"0.8490436",
"0.7806848",
"0.74153596",
"0.6858063",
"0.67407346",
"0.65829104",
"0.64990044",
"0.6447631",
"0.6409437",
"0.63984436",
"0.63822955",
"0.6373469",
"0.63680404",
"0.6366793",
"0.6324539",
"0.63099676",
"0.6302245",
"0.6295538",
"0.62811995",
"0.625854",
"0.62493... | 0.8438411 | 1 |
Update the information items related to the solution. updatesolutioninfo(self,whichsol_) | def updatesolutioninfo(self,whichsol_):
res = __library__.MSK_XX_updatesolutioninfo(self.__nativep,whichsol_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def updatesolutioninfo(self,whichsol_): # 3\n if not isinstance(whichsol_,soltype): raise TypeError(\"Argument whichsol has wrong type\")\n res = self.__obj.updatesolutioninfo(whichsol_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def get... | [
"0.8501529",
"0.64527994",
"0.61899984",
"0.6184468",
"0.61392975",
"0.61199677",
"0.58779514",
"0.58288413",
"0.5672516",
"0.55942315",
"0.5495648",
"0.5467258",
"0.54266113",
"0.54105836",
"0.53628093",
"0.5335758",
"0.53230315",
"0.5302198",
"0.5299515",
"0.52725923",
"0.5... | 0.8344963 | 1 |
Prints a short summary with optimizer statistics from last optimization. optimizersummary(self,whichstream_) | def optimizersummary(self,whichstream_):
res = __library__.MSK_XX_optimizersummary(self.__nativep,whichstream_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def optimizersummary(self,whichstream_): # 3\n if not isinstance(whichstream_,streamtype): raise TypeError(\"Argument whichstream has wrong type\")\n res = self.__obj.optimizersummary(whichstream_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",... | [
"0.83530533",
"0.6444",
"0.6087136",
"0.60660774",
"0.6059675",
"0.6035606",
"0.5917163",
"0.5904062",
"0.58675843",
"0.58628947",
"0.5861443",
"0.58124137",
"0.5800309",
"0.57916075",
"0.57707924",
"0.5766543",
"0.5747041",
"0.5743333",
"0.5730653",
"0.5721178",
"0.572087",
... | 0.84929657 | 0 |
Obtains a cone type code. strtoconetype(self,str_) | def strtoconetype(self,str_):
if isinstance(str_,unicode):
str_ = str_.encode("utf-8",errors="replace")
conetype_ = ctypes.c_int32()
res = __library__.MSK_XX_strtoconetype(self.__nativep,str_,ctypes.byref(conetype_))
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def strtoconetype(self,str_): # 3\n res,resargs = self.__obj.strtoconetype(str_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)\n _conetype_return_value = resargs\n _conetype_return_value = conetype(_conetype_return_value)\n return _con... | [
"0.88242376",
"0.6349188",
"0.6107515",
"0.6085521",
"0.60675335",
"0.6044869",
"0.5956564",
"0.5874813",
"0.5784901",
"0.57551634",
"0.5743284",
"0.5739826",
"0.56517434",
"0.5638696",
"0.5600427",
"0.55771667",
"0.5558863",
"0.5557807",
"0.55551755",
"0.5549347",
"0.553369"... | 0.85956 | 1 |
Obtains a status key. strtosk(self,str_) | def strtosk(self,str_):
if isinstance(str_,unicode):
str_ = str_.encode("utf-8",errors="replace")
sk_ = ctypes.c_int32()
res = __library__.MSK_XX_strtosk(self.__nativep,str_,ctypes.byref(sk_))
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg)
_sk_return_va... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def strtosk(self,str_): # 3\n res,resargs = self.__obj.strtosk(str_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)\n _sk_return_value = resargs\n return _sk_return_value",
"def _GetKeyString(self):",
"def _GetKeyString(self):",
"def _... | [
"0.7463206",
"0.63048255",
"0.63048255",
"0.6093281",
"0.60203123",
"0.5681855",
"0.56371945",
"0.55297583",
"0.5436478",
"0.5360586",
"0.53496593",
"0.53464997",
"0.5341332",
"0.53328174",
"0.5318203",
"0.52947754",
"0.52796894",
"0.52793884",
"0.5278508",
"0.5275866",
"0.52... | 0.8100815 | 0 |
Write a complete binary dump of the task data. writetask(self,filename_) | def writetask(self,filename_):
if isinstance(filename_,unicode):
filename_ = filename_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_writetask(self.__nativep,filename_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def writetask(self,filename_): # 3\n res = self.__obj.writetask(filename_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def serialize(self, to_file=None):\n if to_file is not None:\n raise ValueError(\n \"TaskIn... | [
"0.76278293",
"0.66411906",
"0.6338404",
"0.6297968",
"0.6297968",
"0.6217573",
"0.6178854",
"0.60562927",
"0.6003934",
"0.59263074",
"0.5922769",
"0.5882908",
"0.5819537",
"0.58133584",
"0.58092064",
"0.5795702",
"0.57952464",
"0.57715166",
"0.5770719",
"0.575975",
"0.574959... | 0.7415279 | 1 |
Load task data from a file. readtask(self,filename_) | def readtask(self,filename_):
if isinstance(filename_,unicode):
filename_ = filename_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_readtask(self.__nativep,filename_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def readtask(self,filename_): # 3\n res = self.__obj.readtask(filename_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def load_tasks(self, task_file):\n\n\t\tself.tasklist.tasks = util.load(task_file)\n\t\tTask.last_id = len(self.tasklist.tasks... | [
"0.80296904",
"0.72496146",
"0.7088076",
"0.7083461",
"0.69893193",
"0.6900385",
"0.68146265",
"0.67244583",
"0.6720494",
"0.6645653",
"0.6595403",
"0.65645224",
"0.65645224",
"0.6510227",
"0.6467875",
"0.6425703",
"0.6416887",
"0.64050037",
"0.63069814",
"0.62808853",
"0.623... | 0.77301157 | 1 |
Load task data from a string in OPF format. readopfstring(self,data_) | def readopfstring(self,data_):
if isinstance(data_,unicode):
data_ = data_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_readopfstring(self.__nativep,data_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def readptfstring(self,data_):\n if isinstance(data_,unicode):\n data_ = data_.encode(\"utf-8\",errors=\"replace\")\n res = __library__.MSK_XX_readptfstring(self.__nativep,data_)\n if res != 0:\n _,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def _load(self, data):\n ... | [
"0.6794951",
"0.64501524",
"0.6257614",
"0.62188506",
"0.5981521",
"0.59138155",
"0.58334607",
"0.57561445",
"0.55966187",
"0.553957",
"0.5505495",
"0.53398323",
"0.5314852",
"0.52946866",
"0.5283617",
"0.525373",
"0.52212423",
"0.52142024",
"0.5210204",
"0.5205793",
"0.52055... | 0.7010937 | 0 |
Load task data from a string in LP format. readlpstring(self,data_) | def readlpstring(self,data_):
if isinstance(data_,unicode):
data_ = data_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_readlpstring(self.__nativep,data_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def readptfstring(self,data_):\n if isinstance(data_,unicode):\n data_ = data_.encode(\"utf-8\",errors=\"replace\")\n res = __library__.MSK_XX_readptfstring(self.__nativep,data_)\n if res != 0:\n _,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def _load(self, data):\n ... | [
"0.6374487",
"0.63396025",
"0.6261898",
"0.5823688",
"0.5761187",
"0.572786",
"0.5603073",
"0.55118525",
"0.548002",
"0.5409333",
"0.53713614",
"0.53710246",
"0.5349839",
"0.53278965",
"0.53266686",
"0.5312053",
"0.5271302",
"0.52626383",
"0.52433527",
"0.52351403",
"0.520678... | 0.7284312 | 0 |
Load task data from a string in PTF format. readptfstring(self,data_) | def readptfstring(self,data_):
if isinstance(data_,unicode):
data_ = data_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_readptfstring(self.__nativep,data_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _load(self, data):\n raise NotImplementedError(\"Don't know how to load the task\")",
"def load_from_string_list(self, data):\n self.data = data\n self.loaded = True",
"def readstring(self, fstring):\n return self.parse(fstring)",
"def _read_data(self, \n data_path : st... | [
"0.624653",
"0.58884597",
"0.5842658",
"0.58061516",
"0.57342064",
"0.5731174",
"0.5722274",
"0.5629815",
"0.5598952",
"0.557254",
"0.55650526",
"0.5564843",
"0.5533171",
"0.54985625",
"0.53941905",
"0.53820044",
"0.5362768",
"0.5348556",
"0.5286359",
"0.5258125",
"0.52522415... | 0.7285745 | 0 |
Writes all the parameters to a parameter file. writeparamfile(self,filename_) | def writeparamfile(self,filename_):
if isinstance(filename_,unicode):
filename_ = filename_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_writeparamfile(self.__nativep,filename_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def writeparamfile(self,filename_): # 3\n res = self.__obj.writeparamfile(filename_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def write_parameter_sets(self, filename = 'inputparameterfile', *args,\n **kwargs):\n ... | [
"0.8479623",
"0.7223541",
"0.71134436",
"0.704342",
"0.69193083",
"0.68712884",
"0.6840946",
"0.6750531",
"0.6718471",
"0.6663219",
"0.66562045",
"0.6610654",
"0.65982085",
"0.65181977",
"0.647503",
"0.6464667",
"0.6421562",
"0.6421562",
"0.64120954",
"0.6394938",
"0.6388683"... | 0.78043985 | 1 |
Obtains an infeasible subproblem. getinfeasiblesubproblem(self,whichsol_) | def getinfeasiblesubproblem(self,whichsol_):
inftask_ = ctypes.c_void_p()
res = __library__.MSK_XX_getinfeasiblesubproblem(self.__nativep,whichsol_,ctypes.byref(inftask_))
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg)
_inftask_return_value = Task(nativep = infta... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ineqconstr(x, problem):\n x, t_final = matrify(x, problem)\n c = []\n\n # inter vehicles\n c += [veh_coll_avoid(x[:, :2, v1], x[:, :2, v2], problem)\n for v1 in range(problem['Nv']) for v2 in range(v1 + 1, problem['Nv'])]\n\n # obstacles\n c += [obs.avoid(x[:, :2, veh]) for obs in pr... | [
"0.5406454",
"0.5405638",
"0.54013044",
"0.54003686",
"0.53582644",
"0.53561485",
"0.534527",
"0.53344864",
"0.53250533",
"0.53217924",
"0.53196096",
"0.53157514",
"0.5308851",
"0.5305068",
"0.5287506",
"0.5270815",
"0.5264659",
"0.52540594",
"0.52518165",
"0.524636",
"0.5227... | 0.86953276 | 0 |
Write a solution to a file. writesolution(self,whichsol_,filename_) | def writesolution(self,whichsol_,filename_):
if isinstance(filename_,unicode):
filename_ = filename_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_writesolution(self.__nativep,whichsol_,filename_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def writesolution(self,whichsol_,filename_): # 3\n if not isinstance(whichsol_,soltype): raise TypeError(\"Argument whichsol has wrong type\")\n res = self.__obj.writesolution(whichsol_,filename_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
... | [
"0.87910414",
"0.7406337",
"0.72049326",
"0.7029762",
"0.6727161",
"0.6507342",
"0.63737875",
"0.6302796",
"0.6293724",
"0.6199659",
"0.61895025",
"0.6181373",
"0.61070776",
"0.61070776",
"0.60899645",
"0.60780126",
"0.607718",
"0.6065927",
"0.60460186",
"0.5984384",
"0.59831... | 0.83074623 | 1 |
Writes a solution to a JSON file. writejsonsol(self,filename_) | def writejsonsol(self,filename_):
if isinstance(filename_,unicode):
filename_ = filename_.encode("utf-8",errors="replace")
res = __library__.MSK_XX_writejsonsol(self.__nativep,filename_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def writejsonsol(self,filename_): # 3\n res = self.__obj.writejsonsol(filename_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def write_json(self, filename):\n with open(filename, 'a+') as f:\n f.write(json.dumps(self.weights)... | [
"0.87295",
"0.74165505",
"0.72694594",
"0.71959645",
"0.7129806",
"0.7129806",
"0.71224076",
"0.7121763",
"0.7065886",
"0.70466745",
"0.70419866",
"0.70303464",
"0.700208",
"0.69454724",
"0.6898068",
"0.6853677",
"0.68358284",
"0.6761869",
"0.6744697",
"0.671354",
"0.6709994"... | 0.8033375 | 1 |
Perform sensitivity analysis on bounds. primalsensitivity(self,subi_,marki_,subj_,markj_,leftpricei_,rightpricei_,leftrangei_,rightrangei_,leftpricej_,rightpricej_,leftrangej_,rightrangej_) | def primalsensitivity(self,subi_,marki_,subj_,markj_,leftpricei_,rightpricei_,leftrangei_,rightrangei_,leftpricej_,rightpricej_,leftrangej_,rightrangej_):
numi_ = None
if numi_ is None:
numi_ = len(subi_)
elif numi_ != len(subi_):
raise IndexError("Inconsistent length of array subi")
if numi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def primalsensitivity(self,subi,marki,subj,markj,leftpricei,rightpricei,leftrangei,rightrangei,leftpricej,rightpricej,leftrangej,rightrangej): # 3\n numi_ = None\n if numi_ is None:\n numi_ = len(subi)\n elif numi_ != len(subi):\n raise IndexError(\"Inconsistent length of array subi\")... | [
"0.8516134",
"0.61320364",
"0.6070157",
"0.5505288",
"0.5244543",
"0.5228772",
"0.51506406",
"0.50980216",
"0.50866646",
"0.5006929",
"0.5002792",
"0.49891976",
"0.49730042",
"0.49282205",
"0.49270394",
"0.49166498",
"0.49019164",
"0.48693013",
"0.48592722",
"0.48548737",
"0.... | 0.8563157 | 0 |
Creates a sensitivity report. sensitivityreport(self,whichstream_) | def sensitivityreport(self,whichstream_):
res = __library__.MSK_XX_sensitivityreport(self.__nativep,whichstream_)
if res != 0:
_,msg = self.__getlasterror(res)
raise Error(rescode(res),msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sensitivityreport(self,whichstream_): # 3\n if not isinstance(whichstream_,streamtype): raise TypeError(\"Argument whichstream has wrong type\")\n res = self.__obj.sensitivityreport(whichstream_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)... | [
"0.84275156",
"0.53856975",
"0.5332675",
"0.52303034",
"0.5183973",
"0.50662196",
"0.50250715",
"0.50113016",
"0.49753663",
"0.49550012",
"0.49106225",
"0.49092293",
"0.48568374",
"0.48396832",
"0.47451615",
"0.473587",
"0.47343108",
"0.47330227",
"0.4705782",
"0.47011182",
"... | 0.81320953 | 1 |
Performs sensitivity analysis on objective coefficients. dualsensitivity(self,subj_,leftpricej_,rightpricej_,leftrangej_,rightrangej_) | def dualsensitivity(self,subj_,leftpricej_,rightpricej_,leftrangej_,rightrangej_):
numj_ = None
if numj_ is None:
numj_ = len(subj_)
elif numj_ != len(subj_):
raise IndexError("Inconsistent length of array subj")
if subj_ is None:
raise ValueError("Argument subj cannot be None")
if... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dualsensitivity(self,subj,leftpricej,rightpricej,leftrangej,rightrangej): # 3\n numj_ = None\n if numj_ is None:\n numj_ = len(subj)\n elif numj_ != len(subj):\n raise IndexError(\"Inconsistent length of array subj\")\n if numj_ is None: numj_ = 0\n if subj is None: raise... | [
"0.8261849",
"0.6106334",
"0.6104639",
"0.58061737",
"0.57007354",
"0.55202544",
"0.53209084",
"0.524894",
"0.52469116",
"0.5143102",
"0.5046833",
"0.50303704",
"0.49652806",
"0.49631125",
"0.4957558",
"0.49527156",
"0.49477494",
"0.49313244",
"0.49223545",
"0.49127185",
"0.4... | 0.83717173 | 0 |
Offload the optimization task to a solver server. optimizermt(self,server_,port_) | def optimizermt(self,server_,port_):
if isinstance(server_,unicode):
server_ = server_.encode("utf-8",errors="replace")
if isinstance(port_,unicode):
port_ = port_.encode("utf-8",errors="replace")
trmcode_ = ctypes.c_int32()
res = __library__.MSK_XX_optimizermt(self.__nativep,server_,port_,c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def optimizermt(self,server_,port_): # 3\n res,resargs = self.__obj.optimizermt(server_,port_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)\n _trmcode_return_value = resargs\n _trmcode_return_value = rescode(_trmcode_return_value)\n r... | [
"0.63646656",
"0.5643291",
"0.5561428",
"0.512266",
"0.51177776",
"0.5061218",
"0.50380147",
"0.49591717",
"0.4938649",
"0.49026117",
"0.49010754",
"0.48953548",
"0.48889136",
"0.48848823",
"0.4877491",
"0.4876011",
"0.48473015",
"0.48344618",
"0.4819269",
"0.48074353",
"0.47... | 0.5803405 | 1 |
Offload the optimization task to a solver server. asyncoptimize(self,server_,port_) | def asyncoptimize(self,server_,port_):
if isinstance(server_,unicode):
server_ = server_.encode("utf-8",errors="replace")
if isinstance(port_,unicode):
port_ = port_.encode("utf-8",errors="replace")
token_ = (ctypes.c_char * 33)()
res = __library__.MSK_XX_asyncoptimize(self.__nativep,server_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def asyncoptimize(self,server_,port_): # 3\n arr_token = array.array(\"b\",[0]*(33))\n memview_arr_token = memoryview(arr_token)\n res,resargs = self.__obj.asyncoptimize(server_,port_,memview_arr_token)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(r... | [
"0.6602464",
"0.5121303",
"0.5121116",
"0.50080115",
"0.48946133",
"0.47785783",
"0.47696742",
"0.46918422",
"0.46745405",
"0.46690065",
"0.46030888",
"0.45859867",
"0.45737752",
"0.4560305",
"0.45586684",
"0.4554464",
"0.45519593",
"0.45377553",
"0.45205483",
"0.44452822",
"... | 0.61663544 | 1 |
Request that the job identified by the token is terminated. asyncstop(self,server_,port_,token_) | def asyncstop(self,server_,port_,token_):
if isinstance(server_,unicode):
server_ = server_.encode("utf-8",errors="replace")
if isinstance(port_,unicode):
port_ = port_.encode("utf-8",errors="replace")
if isinstance(token_,unicode):
token_ = token_.encode("utf-8",errors="replace")
res ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def asyncstop(self,server_,port_,token_): # 3\n res = self.__obj.asyncstop(server_,port_,token_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)",
"def stop_server(self):\r\n # TODO-SDH Add way to stop the server from running.\r",
"def stop(... | [
"0.85108995",
"0.6669743",
"0.6566155",
"0.6552622",
"0.6488106",
"0.64568543",
"0.6397652",
"0.6383138",
"0.636795",
"0.63649935",
"0.63017964",
"0.62986946",
"0.62985563",
"0.62593824",
"0.62358534",
"0.62237436",
"0.6220952",
"0.61999017",
"0.6176527",
"0.61644346",
"0.612... | 0.84137243 | 1 |
Requests information about the status of the remote job. asyncpoll(self,server_,port_,token_) | def asyncpoll(self,server_,port_,token_):
if isinstance(server_,unicode):
server_ = server_.encode("utf-8",errors="replace")
if isinstance(port_,unicode):
port_ = port_.encode("utf-8",errors="replace")
if isinstance(token_,unicode):
token_ = token_.encode("utf-8",errors="replace")
resp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def asyncpoll(self,server_,port_,token_): # 3\n res,resargs = self.__obj.asyncpoll(server_,port_,token_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)\n _respavailable_return_value,_resp_return_value,_trm_return_value = resargs\n _trm_retur... | [
"0.7130952",
"0.63021195",
"0.6182163",
"0.607293",
"0.5802242",
"0.5686539",
"0.5662773",
"0.55745256",
"0.5566215",
"0.5563341",
"0.5563341",
"0.55591416",
"0.552535",
"0.55108213",
"0.54052144",
"0.5399891",
"0.5390036",
"0.5387752",
"0.5369794",
"0.5271437",
"0.5226669",
... | 0.7092134 | 1 |
Request a response from a remote job. asyncgetresult(self,server_,port_,token_) | def asyncgetresult(self,server_,port_,token_):
if isinstance(server_,unicode):
server_ = server_.encode("utf-8",errors="replace")
if isinstance(port_,unicode):
port_ = port_.encode("utf-8",errors="replace")
if isinstance(token_,unicode):
token_ = token_.encode("utf-8",errors="replace")
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def asyncgetresult(self,server_,port_,token_): # 3\n res,resargs = self.__obj.asyncgetresult(server_,port_,token_)\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)\n _respavailable_return_value,_resp_return_value,_trm_return_value = resargs\n ... | [
"0.82163835",
"0.6389818",
"0.63313067",
"0.60418195",
"0.6038077",
"0.5966368",
"0.5915231",
"0.5874337",
"0.57946885",
"0.57472014",
"0.568589",
"0.5681426",
"0.5653823",
"0.5595842",
"0.5568461",
"0.5545757",
"0.5533846",
"0.55289096",
"0.55240965",
"0.5513361",
"0.5510967... | 0.81356907 | 1 |
Returns True if this type is used in a variadic argument. bool | def is_variadic(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_variadic(self):\n if self.is_function() and self.args:\n return self.args[-1].endswith(\"...\")\n return False",
"def check_args(args):\n for arg in vars(args):\n if getattr(args, arg):\n return True\n return False",
"def takes_multiple_ar... | [
"0.7789966",
"0.6522471",
"0.6384409",
"0.6294994",
"0.6294994",
"0.62792814",
"0.6124202",
"0.6067434",
"0.60662395",
"0.6052541",
"0.60394627",
"0.60286164",
"0.59856653",
"0.59645915",
"0.59602636",
"0.5950267",
"0.59254897",
"0.5895693",
"0.5832743",
"0.5820968",
"0.57882... | 0.7150723 | 1 |
Returns True if |self| is a NumberType. bool | def is_number_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_number(self) -> bool:\n return False",
"def isnumeric(self):\n return isnumeric(self)",
"def is_numerable(self):\n return (self.is_unknown or self.is_byte or self.is_word\n or self.is_dword or self.is_qword)",
"def is_number(self, value):\n if isinstance(value, (... | [
"0.7953751",
"0.7412868",
"0.7394168",
"0.73898447",
"0.72582585",
"0.72320116",
"0.7230378",
"0.71296614",
"0.71097714",
"0.7034134",
"0.70097035",
"0.6974943",
"0.69388425",
"0.6865268",
"0.68128484",
"0.6790667",
"0.6776975",
"0.67644984",
"0.66986984",
"0.66595286",
"0.66... | 0.77732486 | 1 |
Returns True if |self| is a RealNumberType. bool | def is_real_number_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_real(self):\n return all([isinstance(dim, Real) for dim in self.dimensions])",
"def isReal(self):\n return _libsbml.ASTNode_isReal(self)",
"def is_real(self):\r\n return self._imag.is_zero()",
"def is_real(self) -> bool:\n return not any(self.v)",
"def _is_real(symbol):\n... | [
"0.75589144",
"0.7233921",
"0.6978747",
"0.681329",
"0.67448235",
"0.66748357",
"0.66022563",
"0.65728545",
"0.65497756",
"0.653825",
"0.6438274",
"0.6377211",
"0.6347165",
"0.62609124",
"0.62475",
"0.6229639",
"0.62187284",
"0.6214366",
"0.6165807",
"0.5998228",
"0.59811014"... | 0.7969597 | 0 |
Returns True if |self| is an ObjectType. bool | def is_object_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def isinstance_blender_object(self, b_obj):\n # lame and slow, but functional\n return b_obj in Blender.Object.Get()",
"def verify_type(self, obj):\n return isinstance(obj, self.type_)",
"def object_type_present(self, object_type):\n # Check input.\n if not isinstance(object_... | [
"0.7290644",
"0.6918381",
"0.6855239",
"0.681674",
"0.6812159",
"0.66543907",
"0.664714",
"0.65621924",
"0.65621924",
"0.65621924",
"0.65621924",
"0.65621924",
"0.6510388",
"0.64790374",
"0.64409184",
"0.6381249",
"0.63387465",
"0.6333009",
"0.62965983",
"0.62965983",
"0.6294... | 0.73837817 | 0 |
Returns True if |self| is an AnyType. bool | def is_any_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _is_any(typeval: Type) -> bool:\n return typeval in _ANY",
"def any(self) -> bool:",
"def is_a(self, t):\n return isinstance(self._, t)",
"def of_type(self, a):\n return type(a) == type(self.one)",
"def __bool__(self):\n return bool(self.obj)",
"def any(x) -> bool:\n pass",
... | [
"0.7405247",
"0.6943971",
"0.65161765",
"0.6286378",
"0.6231235",
"0.6206884",
"0.61998576",
"0.61801803",
"0.6145843",
"0.61362964",
"0.6085742",
"0.6085742",
"0.60733044",
"0.60606396",
"0.6040771",
"0.6012931",
"0.6012655",
"0.5969699",
"0.59533924",
"0.5941362",
"0.592886... | 0.7389143 | 1 |
Returns True if |self| is an InterfaceType. bool | def is_interface_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_interface(self, file, i):\n\n # Get doc_str for class\n doc_str = self.get_doc_str(file, i)\n\n # Check if line specifies interface\n class_type = None\n\n # Iterate over lines in docstring\n for line in doc_str:\n\n # Search for string match \"class type... | [
"0.7116907",
"0.69529134",
"0.6768456",
"0.65538967",
"0.6530441",
"0.6227138",
"0.61110246",
"0.6041694",
"0.60142016",
"0.59563255",
"0.58967304",
"0.5890976",
"0.588442",
"0.58537626",
"0.5843988",
"0.579155",
"0.5761401",
"0.5754417",
"0.5736469",
"0.5722448",
"0.5722448"... | 0.7915525 | 0 |
Returns True if |self| is a NamespaceType. bool | def is_namespace_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hasNamespaceNS(self, *args):\n return _libsbml.XMLToken_hasNamespaceNS(self, *args)",
"def isSBMLNamespace(*args):\n return _libsbml.SBMLNamespaces_isSBMLNamespace(*args)",
"def hasNS(self, *args):\n return _libsbml.XMLNamespaces_hasNS(self, *args)",
"def hasNamespaceURI(self, *args)... | [
"0.6642418",
"0.65552014",
"0.64188397",
"0.63565373",
"0.6347774",
"0.6345759",
"0.6091694",
"0.60831106",
"0.6014322",
"0.5938113",
"0.5913756",
"0.58826727",
"0.5857198",
"0.58479625",
"0.58289057",
"0.5818701",
"0.5818701",
"0.5781182",
"0.56841654",
"0.5679502",
"0.56740... | 0.776895 | 0 |
Returns True if |self| is a CallbackInterfaceType. bool | def is_callback_interface_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_callback_function_type(self):\n raise exceptions.NotImplementedError()",
"def isCall(self) -> bool:\n ...",
"def is_function_type(self, objtype):\n # return self.__cfuncptrt == type(objtype)\n return issubclass(objtype, self.__cfuncptrt)\n # return isinstance(objtype, ... | [
"0.72134316",
"0.6319314",
"0.6022175",
"0.59459776",
"0.59300095",
"0.5850091",
"0.5819407",
"0.57849604",
"0.57714933",
"0.5738899",
"0.5683553",
"0.56677616",
"0.5630323",
"0.5536595",
"0.5504375",
"0.5490046",
"0.546221",
"0.5431004",
"0.5413289",
"0.54089355",
"0.5399478... | 0.7897599 | 0 |
Returns True if |self| is a CallbackFunctionType. bool | def is_callback_function_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_function_type(self, objtype):\n # return self.__cfuncptrt == type(objtype)\n return issubclass(objtype, self.__cfuncptrt)\n # return isinstance(objtype, self.__cfuncptrt)",
"def is_function(self):\n return self.args is not None",
"def is_function(self):\n return False"... | [
"0.7153936",
"0.6989906",
"0.6942195",
"0.6871938",
"0.6591295",
"0.64573854",
"0.64336544",
"0.64194083",
"0.6401891",
"0.62902033",
"0.62851524",
"0.61820483",
"0.61599416",
"0.6106562",
"0.59508336",
"0.5926797",
"0.5912897",
"0.5894191",
"0.5893967",
"0.5843545",
"0.58299... | 0.7611457 | 0 |
Returns True if |self| is a VoidType. bool | def is_void_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_void(self):\n return False",
"def IsVoid(self, *args):\n return _Bnd.Bnd_Box_IsVoid(self, *args)",
"def is_void(type):\n return remove_alias(type) in create_cv_types(cpptypes.void_t())",
"def IsVoid(self, *args):\n return _Bnd.Bnd_Box2d_IsVoid(self, *args)",
"def is_pointer_t... | [
"0.82286865",
"0.7611015",
"0.74208486",
"0.68909454",
"0.6569038",
"0.6109725",
"0.593446",
"0.581228",
"0.5786375",
"0.5749218",
"0.57407707",
"0.57311565",
"0.57092",
"0.5671437",
"0.5671437",
"0.5671437",
"0.5671437",
"0.5667571",
"0.56453985",
"0.5642926",
"0.5642926",
... | 0.7789936 | 1 |
Returns True if |self| is an AnnotatedType. bool | def is_annotated_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_annotated_type(self) -> bool:\n return get_origin(self.type) is Annotated",
"def is_typing_annotation(node: ast.AST, ctx: 'model.Documentable') -> bool:\n return is_using_annotations(node, TYPING_ALIAS, ctx) or \\\n is_using_annotations(node, SUBSCRIPTABLE_CLASSES_PEP585, ctx)",
"de... | [
"0.8426096",
"0.6878035",
"0.67209965",
"0.6478677",
"0.614293",
"0.6041532",
"0.60102296",
"0.6004325",
"0.5994643",
"0.5971596",
"0.5964204",
"0.5907197",
"0.58609444",
"0.5856965",
"0.5855007",
"0.58441585",
"0.58273065",
"0.582121",
"0.57902175",
"0.57866234",
"0.57857174... | 0.7609778 | 1 |
Returns True if |self| is a PromiseType. bool | def is_promise_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __bool__(self):\n return self.is_successful",
"def is_task(self):\n from .tasks import Task\n return isinstance(self, Task)",
"def __bool__(self):\n return bool(self.obj)",
"def in_progress(self: \"Status\") -> bool:\n return isinstance(self, InProgress)",
"def is_asy... | [
"0.60700285",
"0.6006526",
"0.600101",
"0.5995107",
"0.5994056",
"0.59527934",
"0.59483606",
"0.59320986",
"0.5809807",
"0.574972",
"0.56372863",
"0.5637197",
"0.5637197",
"0.5637197",
"0.5628994",
"0.56172556",
"0.56081927",
"0.56081927",
"0.56081927",
"0.55745226",
"0.55606... | 0.76272804 | 0 |
Returns True if |self| is a RecordType. bool | def is_record_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def supports_book_record_type(self, book_record_type=None):\n if book_record_type is None:\n raise NullArgument()\n return False",
"def supports_catalog_record_type(self, catalog_record_type=None):\n if catalog_record_type is None:\n raise NullArgument()\n return... | [
"0.657329",
"0.6553393",
"0.6409709",
"0.6220432",
"0.6149315",
"0.6113821",
"0.61134356",
"0.6092015",
"0.603679",
"0.5925932",
"0.58947814",
"0.5886511",
"0.5882126",
"0.5842346",
"0.58168924",
"0.5733191",
"0.57082087",
"0.5686609",
"0.5648512",
"0.56156236",
"0.56152785",... | 0.79121345 | 0 |
Returns True if |self| is a SequenceType. bool | def is_sequence_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_sequence(self) -> bool:\n return isinstance(self.yaml_node, yaml.SequenceNode)",
"def isSequence(obj):\n # type: (Any) -> bool\n return isinstance(obj, Sequence)",
"def issequence(obj) -> bool:\n return hasattr(type(obj), '__iter__') and hasattr(type(obj), '__len__')",
"def _is_sequenc... | [
"0.80957925",
"0.71997213",
"0.6930186",
"0.6835188",
"0.6770618",
"0.64282125",
"0.6424273",
"0.64200723",
"0.6333723",
"0.63057405",
"0.6290044",
"0.60951614",
"0.6089056",
"0.60546523",
"0.6032186",
"0.6004696",
"0.59916586",
"0.5949501",
"0.5874908",
"0.586695",
"0.583887... | 0.7640966 | 1 |
Returns True if |self| is a UnionType. bool | def is_union_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _is_union(typeval: Type) -> bool:\n return get_origin(typeval) is Union",
"def is_union(type_):\n if not is_class(type_):\n return False\n decl = class_traits.get_declaration(type_)\n return decl.class_type == class_declaration.CLASS_TYPES.UNION",
"def is_Union(tp):\n if tp is Union:\... | [
"0.8105555",
"0.7861087",
"0.7817273",
"0.7705603",
"0.7646727",
"0.7483963",
"0.7477847",
"0.74555516",
"0.69131905",
"0.6808421",
"0.65584767",
"0.58904076",
"0.5881067",
"0.570471",
"0.56558865",
"0.56558865",
"0.5652963",
"0.562509",
"0.5571252",
"0.5558063",
"0.5529574",... | 0.81638217 | 0 |
Returns Typedef instances which directly point this type. tuple(Typedef) | def typedefs(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def typenames(self):\n return tuple((item[0] for item in self))",
"def visit_tuple_type(self, left: TupleType) -> T:",
"def type(self) -> global___Type:",
"def __tuple(self):\n return (self.__app, self.__namespace, self.__pairs)",
"def _p_type(self):\n # FIXME: Something about self referen... | [
"0.6696826",
"0.57943803",
"0.57066506",
"0.56916595",
"0.56512207",
"0.5642418",
"0.5635808",
"0.5627796",
"0.55997837",
"0.5572192",
"0.5496701",
"0.5446311",
"0.5444676",
"0.5443081",
"0.5426574",
"0.5398417",
"0.53773963",
"0.53727347",
"0.5328607",
"0.5304586",
"0.527899... | 0.64053947 | 1 |
Returns True if 'unrestricted' is specified. bool | def is_unrestricted(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def permissive(self) -> bool:\n return self._permissive",
"def privileged(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"privileged\")",
"def privileged(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"privileged\")",
"def _disallow_public_access(sel... | [
"0.6544667",
"0.638061",
"0.638061",
"0.6114495",
"0.60935193",
"0.60935193",
"0.60431635",
"0.60431635",
"0.59647554",
"0.5900266",
"0.58141834",
"0.5814022",
"0.58053815",
"0.57084066",
"0.5697186",
"0.56897306",
"0.56897306",
"0.5680323",
"0.560833",
"0.5602042",
"0.559735... | 0.75456357 | 0 |
Returns the result type. IdlType | def result_type(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def result_type(self) -> Optional[str]:\n if hasattr(self, \"_result_type\"):\n return self._result_type\n _args: list[Arg] = []\n _ctx = self._select(\"resultType\", _args)\n return _ctx.execute_sync(Optional[str])",
"def result_type(self):\r\n if not hasattr(self, ... | [
"0.7371791",
"0.7227484",
"0.70264876",
"0.695912",
"0.68952215",
"0.67422324",
"0.6730174",
"0.6698153",
"0.6698153",
"0.6698153",
"0.6698153",
"0.6698153",
"0.6698153",
"0.6698153",
"0.6698153",
"0.6698153",
"0.6698153",
"0.6698153",
"0.6698153",
"0.6698153",
"0.6698153",
... | 0.72648156 | 1 |
Returns a list of member types. tuple(IdlType) | def member_types(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def flattened_member_types(self):\n raise exceptions.NotImplementedError()",
"def get_members():",
"def typenames(self):\n return tuple((item[0] for item in self))",
"def getTypeCode(self):\n return _libsbml.ListOfMembers_getTypeCode(self)",
"def ntypes(self): # -> list[str]:\n ... | [
"0.68188757",
"0.63429254",
"0.6320436",
"0.628236",
"0.6216023",
"0.6130448",
"0.606133",
"0.6058626",
"0.6038821",
"0.6021799",
"0.6015155",
"0.6015155",
"0.59637636",
"0.5952403",
"0.59175074",
"0.5888799",
"0.5880538",
"0.5880081",
"0.58317626",
"0.583168",
"0.5800849",
... | 0.71356374 | 0 |
Returns a set of flattened member types. | def flattened_member_types(self):
raise exceptions.NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def direct_descendant_type_set(self) -> Set[str]:\n return set(chain.from_iterable(seg.class_types for seg in self.segments))",
"def descendant_type_set(self) -> Set[str]:\n return set(\n chain.from_iterable(\n seg.descendant_type_set | seg.class_types for seg in self.segm... | [
"0.6395949",
"0.61097467",
"0.6098791",
"0.60910064",
"0.6064942",
"0.60378265",
"0.60336834",
"0.6015646",
"0.5942752",
"0.5909887",
"0.5851412",
"0.5845181",
"0.5836261",
"0.58322257",
"0.57702565",
"0.5755678",
"0.572548",
"0.5714109",
"0.5702991",
"0.5687666",
"0.56698954... | 0.8199972 | 0 |
Calculate partial derivative of f at xi ... | def partial_derivative(f, x, i, epsilon = 1e-10):
x_ = np.copy(x).astype(np.float64)
x_[i] = x_[i] + epsilon
value = (f(x_) - f(x)) / epsilon
return value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def partial ( index , func , x , h = 0 , I = 2 , err = False ) :\n \n if len(x) <= index :\n raise AttributeError(\"Invalid argument length/index %d/%d\" % ( len(x) , index ) )\n \n _x = [ float(a) for a in x ]\n \n ## create wrapper function \n def _wrap ( z ) :\n _z =... | [
"0.75414956",
"0.736744",
"0.73278105",
"0.7199806",
"0.71724826",
"0.71724826",
"0.714068",
"0.702706",
"0.69684196",
"0.6934339",
"0.69137716",
"0.688898",
"0.6880599",
"0.68199027",
"0.68155897",
"0.67816776",
"0.67622113",
"0.67365223",
"0.6713649",
"0.66943544",
"0.65928... | 0.8333256 | 0 |
Calculate Jacobian of f wrt x ... | def jacobian(f, x, epsilon = 1e-10):
f_ = f(x)
value = np.zeros((len(f_), len(x)))
for i in range(len(x)):
f_ = partial_derivative(f, x, i, epsilon)
value[:,i] = f_
return value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jacobian_func(f):\n jacobian = jacfwd(f)\n return jacobian",
"def jacobian(f, x):\n\n B, N = x.shape\n x.requires_grad = True\n in_ = torch.zeros(B, 1)\n \n y = f(in_, x)\n jacobian = list()\n \n for i in range(N):\n v = torch.zeros_like(y)\n v[:, i] = 1.\n ... | [
"0.8722021",
"0.8635077",
"0.8538924",
"0.84087753",
"0.8155197",
"0.801174",
"0.79759496",
"0.78006744",
"0.7767167",
"0.7756485",
"0.7756485",
"0.77275866",
"0.7719678",
"0.7650497",
"0.76414347",
"0.7623823",
"0.7577455",
"0.7467225",
"0.7465109",
"0.7456953",
"0.7437073",... | 0.86678606 | 1 |
parity of a big word is the xor of the parity of words that compose this big word | def parity_of_very_long(x, word_size=8):
res = 0
hash_map = {}
while x!=0:
word = x & ( (1<<word_size)-1)
if not(word in hash_map):
hash_map[word] = parityOf(word)
res ^= hash_map[word]
x >>= word_size
print(hash_map)
return res | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def calc_syndrome(codeword, n):\r\n sym = 0\r\n for i in range(1, n):\r\n if codeword[i]:\r\n sym ^= i\r\n extra_parity = calc_parity_vector(codeword)\r\n if extra_parity == codeword[0]:\r\n if sym == 0:\r\n return 0, sym\r\n else:\r\n return 2, sym... | [
"0.7136234",
"0.69508874",
"0.683343",
"0.6732784",
"0.6722891",
"0.6712324",
"0.6674293",
"0.6639559",
"0.662268",
"0.66004324",
"0.65794253",
"0.65109783",
"0.64871514",
"0.6413661",
"0.6333544",
"0.6296736",
"0.6278239",
"0.6260027",
"0.6147197",
"0.6048034",
"0.59243625",... | 0.69843024 | 1 |
Return list with 50 positive and 10 negative samples | def sampleset():
pos = [(0, i) for i in range(50)]
neg = [(1, i) for i in range(10)]
return pos + neg | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def generate_negative_sample_list(self, xc_start):\r\n return [self.get_random_Nb_sample(xc_start) for _ in range(self.Nb)]",
"def _sample_negative(self, positives):\n max_val = self._H * self._W\n num_pos = len(positives)\n num_neg = int(num_pos * self._sample_ratio)\n positiv... | [
"0.67092043",
"0.659947",
"0.6404769",
"0.6344144",
"0.6319633",
"0.6240499",
"0.61978734",
"0.61512685",
"0.61288166",
"0.6084549",
"0.6071787",
"0.6045156",
"0.59752685",
"0.59652776",
"0.59609824",
"0.59361213",
"0.59042007",
"0.58985853",
"0.5882967",
"0.5882967",
"0.5882... | 0.6612375 | 1 |
Create exactly num_directories subdirectories in path. | def _create_directory_tree(self, path, num_directories):
assert num_directories >= 0
if not num_directories:
return
self._create_directory(path)
num_directories -= 1
# Divide the remaining number of directories to create among 4
# subdirectories in an approximate even fashion.
for i i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _create_directory_tree(self, path, num_directories):\n assert num_directories >= 0\n if not num_directories:\n return\n\n self._create_directory(path)\n num_directories -= 1\n # Divide the remaining number of directories to create among 4\n # subdirectories in an approximate even fashion... | [
"0.7962767",
"0.7113393",
"0.6915076",
"0.67396253",
"0.6736857",
"0.6665003",
"0.65617204",
"0.6539428",
"0.6518947",
"0.65147203",
"0.6502605",
"0.64700353",
"0.6469974",
"0.6457087",
"0.6433749",
"0.64269245",
"0.6422392",
"0.6416041",
"0.63974875",
"0.6356123",
"0.6339711... | 0.79631 | 0 |
Tests that internal _directory_to_subdirs is updated on delete. | def test_subdirectory_deleted(self):
path = self._create_directory('test')
sub_path = self._create_directory('test/test2')
self._watcher.start()
self.assertEqual(
set([sub_path]),
self._watcher._directory_to_subdirs[path])
os.rmdir(sub_path)
self.assertEqual(
set([sub_pa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_subdirectory_deleted(self):\n path = self._create_directory('test')\n sub_path = self._create_directory('test/test2')\n self._watcher.start()\n\n self.assertEqual(\n set([sub_path]),\n self._watcher._directory_to_subdirs[path])\n os.rmdir(sub_path)\n self.assertEqual(\n ... | [
"0.84610265",
"0.65147275",
"0.6495986",
"0.632336",
"0.63160795",
"0.6192951",
"0.6191186",
"0.61434877",
"0.6129643",
"0.6103901",
"0.60978335",
"0.608716",
"0.6058954",
"0.603675",
"0.603421",
"0.6027226",
"0.6024294",
"0.59999007",
"0.59602183",
"0.59490293",
"0.5924875",... | 0.84600556 | 1 |
Run a sentiment analysis request on text within a passed filename. | def analyze_text_sentiment(raw_data_path):
client = language.LanguageServiceClient()
with open(raw_data_path, 'r') as review_file:
content = review_file.read()
document = types.Document(
content=content,
type=enums.Document.Type.PLAIN_TEXT)
annotations = client.analyze_sentimen... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def analyze(movie_review_filename):\n client = language.LanguageServiceClient()\n\n with open(movie_review_filename, 'r') as review_file:\n # Instantiates a plain text document.\n content = review_file.read()\n\n document = types.Document(content=content,\n ... | [
"0.69191617",
"0.6760998",
"0.6308087",
"0.623117",
"0.61973536",
"0.61973536",
"0.61879206",
"0.61140317",
"0.60523087",
"0.60180354",
"0.60157675",
"0.6008048",
"0.60011387",
"0.5983024",
"0.59410757",
"0.5926585",
"0.59205323",
"0.59090775",
"0.590305",
"0.58944255",
"0.58... | 0.6762888 | 1 |
updates a single atom to a potentially new state, quasirandomly | def UpdateAtom(self,atom,update_mode='ordered'):
current = (atom.n,atom.l)
possible = [(final,self.probs[current][final]) for final \
in self.probs[current]]
if update_mode=='random':
random.shuffle(possible)
if update_mode=='ordered':
possible.sort(key=lambda x:x[1])
final = current
for state in p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update(self):\n q = self.M[self.state,:][0]\n self.state = random.choice(self.N,1,p = q)\n return self.state",
"def update(self, next_state, reward):\n pass",
"def update(self):\n if self.size() < 2: return\n idx = random.randint(0, 100) % 3\n if idx < 2:\n slot = ... | [
"0.6271556",
"0.61507183",
"0.59220254",
"0.5901581",
"0.58661723",
"0.58061427",
"0.57873684",
"0.5770999",
"0.5711735",
"0.56835014",
"0.56593686",
"0.5658279",
"0.56573635",
"0.5653307",
"0.5647151",
"0.56323695",
"0.56268525",
"0.5618667",
"0.5605903",
"0.5596673",
"0.559... | 0.6893653 | 0 |
runs through one timestep and updates the atoms | def Iterate(self):
for atom in self.atoms:
self.UpdateAtom(atom) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def next_period_step(self):\n self.update_forces()\n element: Cell\n for element in self.cells:\n self.update_coordinates(element)\n self.update_volosity(element)",
"def _update_positions(self, delta_t):\n\n for atom in self.atoms:\n atom.update(delta_... | [
"0.68202317",
"0.6715678",
"0.6414524",
"0.628308",
"0.6197439",
"0.6184594",
"0.61320144",
"0.6113552",
"0.60633576",
"0.60368603",
"0.6036309",
"0.60067433",
"0.59957993",
"0.59397817",
"0.5897747",
"0.5897021",
"0.5874688",
"0.58444345",
"0.5821056",
"0.58185893",
"0.58007... | 0.7384793 | 0 |
creates a comparison plot of the current atomic state distribution compared to what we expect | def Compare(self,step,steps,saving=True):
plt.ioff()
plt.figure()
plt.plot(np.arange(1,5),self.expected,'o-',color='black',label\
='expected')
plt.plot(np.arange(1,5),np.divide(self.states,np.sum(self.states))\
,'o-',color='green',label='actual')
plt.legend()
plt.title('Expected vs Actual Atom Distrib... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def compare_one_state_evolution(self, value, true_state, option='density'):\n\n fig = plt.figure(figsize=(16, 8), dpi=100)\n ax = fig.add_subplot(111)\n if option == 'density':\n ax.plot(np.squeeze(np.array(self.est_density[value, :])), 'r--', label='Estimated')\n elif option... | [
"0.627075",
"0.5974408",
"0.5943118",
"0.5872826",
"0.58601767",
"0.5731816",
"0.5659566",
"0.5647532",
"0.5573353",
"0.55374664",
"0.5527548",
"0.5518267",
"0.5488848",
"0.54798263",
"0.5470446",
"0.54632896",
"0.5436311",
"0.5432833",
"0.5427665",
"0.5418614",
"0.5414802",
... | 0.64096814 | 0 |
Deposit coins into the users bank prop | def _deposit_coins(user_id: int, coins: int):
if not Wealth.collection.find_one({"_id": user_id}):
return
Wealth.collection.update_one({"_id": user_id}, {"$inc": {
"Bank": coins,
"coins": -coins
}}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deposit_money():\n print(\"\\n\")\n print(messages.account_credentials)\n u_id = pyip.inputInt(\"Your Id: \", greaterThan=0)\n password = pyip.inputPassword(\"Your Password: \")\n\n credentials = {\"id\":u_id, \"password\":password}\n result = BankOperationsBackend.dep... | [
"0.7368084",
"0.7210584",
"0.71865326",
"0.71241224",
"0.7043473",
"0.69961643",
"0.6883361",
"0.6883361",
"0.6859989",
"0.68431985",
"0.68298614",
"0.6818901",
"0.6789854",
"0.67864424",
"0.6737196",
"0.6642632",
"0.66231024",
"0.66116875",
"0.6569632",
"0.65545714",
"0.6537... | 0.797517 | 0 |
Pick a random photo for the `Shootout` command. | def shootout_ran():
return choice([
"https://im-a-dev.xyz/QqoZ2M6m.png",
"https://im-a-dev.xyz/BvdekLII.png",
"https://im-a-dev.xyz/MfSnYYAa.png"
]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def random_image(context, person):\n collection = db['people']\n images = collection.find({'person': person})\n row = []\n for image in images:\n row.append(image['image_url'])\n rand_img = random.choice(list(row))\n return context.channel.send(rand_img)",
"def get_a_picture_randomly(sel... | [
"0.65586865",
"0.6467759",
"0.6397638",
"0.6377332",
"0.6242254",
"0.60787094",
"0.60604465",
"0.6005842",
"0.59123677",
"0.5841395",
"0.5834412",
"0.57959676",
"0.5688708",
"0.5661508",
"0.5629392",
"0.5547989",
"0.5545386",
"0.55240476",
"0.5522917",
"0.55134743",
"0.548782... | 0.68730336 | 0 |
Pick a random photo for the `Trash` command. | def trash_ran():
return choice([
"https://im-a-dev.xyz/om3vsD0s.png", # coins
"https://im-a-dev.xyz/zqyCJ9sH.png", # cookie
"https://im-a-dev.xyz/ogWxLI7K.png", # reputation
"https://im-a-dev.xyz/i8HiGmwU.png" # Nothing
]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def random_image(context, person):\n collection = db['people']\n images = collection.find({'person': person})\n row = []\n for image in images:\n row.append(image['image_url'])\n rand_img = random.choice(list(row))\n return context.channel.send(rand_img)",
"def random_img(path):\n ful... | [
"0.6314875",
"0.5989403",
"0.5938749",
"0.5929158",
"0.5898837",
"0.5824625",
"0.5752863",
"0.5730477",
"0.5720863",
"0.56660914",
"0.5637061",
"0.5596575",
"0.55663687",
"0.552755",
"0.5518498",
"0.55022883",
"0.5477218",
"0.54448146",
"0.542192",
"0.5327834",
"0.5300046",
... | 0.6855739 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.