jijmodeling 1.8.1__cp310-none-win_amd64.whl → 1.10.0__cp310-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jijmodeling might be problematic. Click here for more details.
- jijmodeling/__init__.pyi +152 -2
- jijmodeling/_jijmodeling.cp310-win_amd64.pyd +0 -0
- jijmodeling/range/__init__.py +14 -0
- jijmodeling/range/__init__.pyi +55 -0
- jijmodeling/range/size.py +14 -0
- jijmodeling/range/size.pyi +53 -0
- jijmodeling/range/value.py +14 -0
- jijmodeling/range/value.pyi +53 -0
- {jijmodeling-1.8.1.dist-info → jijmodeling-1.10.0.dist-info}/METADATA +3 -2
- jijmodeling-1.10.0.dist-info/RECORD +18 -0
- jijmodeling-1.8.1.dist-info/RECORD +0 -12
- {jijmodeling-1.8.1.dist-info → jijmodeling-1.10.0.dist-info}/WHEEL +0 -0
- {jijmodeling-1.8.1.dist-info → jijmodeling-1.10.0.dist-info}/licenses/LICENSE.txt +0 -0
jijmodeling/__init__.pyi
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
import numpy
|
|
5
5
|
import numpy.typing
|
|
6
6
|
import typing
|
|
7
|
+
from . import dataset
|
|
7
8
|
from . import experimental
|
|
9
|
+
from . import range
|
|
8
10
|
from enum import Enum, auto
|
|
9
11
|
|
|
10
12
|
__version__: str
|
|
@@ -1676,6 +1678,7 @@ class Interpreter:
|
|
|
1676
1678
|
```
|
|
1677
1679
|
"""
|
|
1678
1680
|
num_decision_variables: int
|
|
1681
|
+
num_constraints: int
|
|
1679
1682
|
def __new__(cls,instance_data:dict): ...
|
|
1680
1683
|
def insert_instance_data(self, key:str, value:float | numpy.typing.NDArray[numpy.float64] | JaggedArray | typing.Sequence[float] | typing.Sequence[typing.Sequence[float]] | typing.Sequence[typing.Sequence[typing.Sequence[float]]] | typing.Sequence[typing.Sequence[typing.Sequence[typing.Sequence[float]]]]) -> None:
|
|
1681
1684
|
...
|
|
@@ -2793,12 +2796,18 @@ class Placeholder:
|
|
|
2793
2796
|
-----------
|
|
2794
2797
|
- `name` (`str`): A name of the placeholder.
|
|
2795
2798
|
- `ndim` (`int`): The number of dimensions of the placeholder.
|
|
2799
|
+
- `shape` (`list` of `Optional[Expression]`, optional): The (partial) shape of the placeholder if given.
|
|
2800
|
+
- `dtype` (`DataType`, optional): The data type (`DataType.INT` or `DataType.FLOAT`) of the placeholder.
|
|
2801
|
+
- `jagged` (`boolean`, defaut: `False`): `True` if the placeholder will be treated as a jagged array in random data generation. Ignored for scalars.
|
|
2796
2802
|
- `description` (`str`, optional): A description of the placeholder.
|
|
2797
2803
|
|
|
2798
2804
|
Args
|
|
2799
2805
|
-----
|
|
2800
2806
|
- `name` (`str`): A name of the placeholder.
|
|
2801
|
-
- `ndim` (`int`): The number of dimensions of the placeholder. Defaults to `0`. The `ndim` must be set to a non-negative value.
|
|
2807
|
+
- `ndim` (`Optional[int]`): The number of dimensions of the placeholder. Defaults to `0`. The `ndim` must be set to a non-negative value and must concide with the length of `shape` if both specified. If `None` is given, you must specify `shape` explicitly and the length of `shape` will be used.
|
|
2808
|
+
- `shape` (`list[Optional[Expression]]`, optional): The (partial) shape of the placeholder. Used for random data generation.
|
|
2809
|
+
- `dtype` (`DataType`, optional): The data type (`DataType.INT` or `DataType.FLOAT`) of the placeholder. Used for random data generation.
|
|
2810
|
+
- `jagged` (`boolean`, defaut: `False`): `True` if the placeholder will be treated as a jagged array in random data generation. Ignored for scalars.
|
|
2802
2811
|
- `latex` (`str`, optional): A LaTeX-name of the placeholder to be represented in Jupyter notebook.
|
|
2803
2812
|
It is set to `name` by default.
|
|
2804
2813
|
- `description` (`str`, optional): A description of the placeholder.
|
|
@@ -2838,9 +2847,11 @@ class Placeholder:
|
|
|
2838
2847
|
"""
|
|
2839
2848
|
name: str
|
|
2840
2849
|
ndim: int
|
|
2850
|
+
dtype: typing.Optional[DataType]
|
|
2851
|
+
jagged: bool
|
|
2841
2852
|
description: typing.Optional[str]
|
|
2842
2853
|
shape: tuple
|
|
2843
|
-
def __new__(cls,name,*,ndim = ...,latex = ...,description = ...): ...
|
|
2854
|
+
def __new__(cls,name,*,ndim = ...,shape = ...,dtype = ...,jagged = ...,latex = ...,description = ...): ...
|
|
2844
2855
|
def len_at(self, axis,*,latex = ...,description = ...) -> ArrayLength:
|
|
2845
2856
|
...
|
|
2846
2857
|
|
|
@@ -3058,6 +3069,145 @@ class Problem:
|
|
|
3058
3069
|
...
|
|
3059
3070
|
|
|
3060
3071
|
def get_problem_schema(self) -> dict:
|
|
3072
|
+
r"""
|
|
3073
|
+
Returns the schema of the problem.
|
|
3074
|
+
|
|
3075
|
+
Returns
|
|
3076
|
+
--------
|
|
3077
|
+
- `schema`: The dictionary containing the schema of the problem.
|
|
3078
|
+
"""
|
|
3079
|
+
...
|
|
3080
|
+
|
|
3081
|
+
def generate_random_dataset(self, default = ...,options = ...,seed = ...) -> dict[str, float | numpy.typing.NDArray[numpy.float64] | JaggedArray]:
|
|
3082
|
+
r"""
|
|
3083
|
+
Generates a dictionary of random `InstanceDataValue` for a given problem.
|
|
3084
|
+
To generate `ommx.v1.Instance` object directly, use `InstanceDataValue.generate_random_instance` instead.
|
|
3085
|
+
|
|
3086
|
+
Args
|
|
3087
|
+
-----
|
|
3088
|
+
- `options` (optional): a dictionary of range parameters for each separate placeholders. The key must be the name of the placeholder and the value must be range parameter (as described in "Range Parameters and Range Syntax" below).
|
|
3089
|
+
- `default` (optional): default range parameters for placeholders which is not specified in `options`.
|
|
3090
|
+
- `seed` (optional): seed for random number generation.
|
|
3091
|
+
|
|
3092
|
+
Returns
|
|
3093
|
+
--------
|
|
3094
|
+
`dict`: The dictionary from the name of placeholders to the generated `InstanceDataValue` objects. To be fed to `Interpreter.eval_problem`.
|
|
3095
|
+
|
|
3096
|
+
Range Parameters and Range Syntax
|
|
3097
|
+
----------------------------------
|
|
3098
|
+
A range parameter is a dictionary consisting of the following fields:
|
|
3099
|
+
- `size` (optional): interval of natural numbers for the size of each array dimension (default: `range(1, 6)`)
|
|
3100
|
+
- `value` (optional): interval of real numbers for the value of each array element (default: `range(-1.0, 1.0)` - a uniform distribution on a closed interval $[-1.0, 1.0]$).
|
|
3101
|
+
|
|
3102
|
+
Example range parameter config:
|
|
3103
|
+
|
|
3104
|
+
```python
|
|
3105
|
+
{"size": range(2, 10), "value": jm.range.value.closed(100.0, 200.0)}
|
|
3106
|
+
```
|
|
3107
|
+
|
|
3108
|
+
Intervals are expressed as a range object.
|
|
3109
|
+
Currently, the following syntax is supported for range objects:
|
|
3110
|
+
|
|
3111
|
+
1. Direct value of type `int` or `float` - it corresponds to a singleton interval $[a, a] = \{a\}$. In random generation context, this just means a constant fixed value.
|
|
3112
|
+
2. Use the functions from `jijmodeling.range`, `jijmodeling.range.size`, or `jijmodeling.range.value` modules.
|
|
3113
|
+
- Use functions from `jij.modeling.range.size` to specify (non-negative) integer intervals, and `jij.modeling.range.value` for real intervals. `jij.modeling.range` dynamically determines the type of the range based on the input.
|
|
3114
|
+
- These three modules provides the following combinators (see the module documents for more details.):
|
|
3115
|
+
- `closed(a, b)`: a closed interval $[a, b]$
|
|
3116
|
+
- `open(a, b)`: an open interval $(a, b)$
|
|
3117
|
+
- `closed_open(a, b)`: an upper half-open interval $[a, b)$
|
|
3118
|
+
- `open_closed(a, b)`: a lower half-open interval $(a, b]$
|
|
3119
|
+
- `greater_than(a)`: an open interval $(a, \infty)$
|
|
3120
|
+
- `at_least(a)`: a closed interval $[a, \infty)$
|
|
3121
|
+
- `less_than(a)`: an open interval $(-\infty, a)$
|
|
3122
|
+
- `at_most(a)`: a closed interval $(-\infty, a]$
|
|
3123
|
+
3. Use `range` builtin function: this is equivalent to `jijmodeling.range.value.closed_open(a, b)`.
|
|
3124
|
+
- Any python range object with `step = 1` can be used as a size range; otherwise it results in runtime error.
|
|
3125
|
+
4. Use a tuple: raw tuple `(a, b)` is equivalent to `jijmodeling.range.closed_open(a, b)` if `a` and `b` are either `int` or `float`.
|
|
3126
|
+
- You can also use bound object as a tuple component; in such case, both tuple components must be one of the following:
|
|
3127
|
+
|
|
3128
|
+
1. A string `"Unbounded"` means $-\infty$ (in the first component) or $\infty$ (the second).
|
|
3129
|
+
2. A dictionary `{"Included": a}` means the endpoint is inclusive.
|
|
3130
|
+
3. A dictionary `{"Excluded": a}` means the endpoint is exclusive.
|
|
3131
|
+
- Examples:
|
|
3132
|
+
- `(1.2, 4)` is equivalent to `closed_open(1.2, 4)`,
|
|
3133
|
+
- `(-1, {"Included": 1})` is equivalent to `closed(-1, 1)`,
|
|
3134
|
+
- `(-5, {"Excluded": 4})` is equivalent to `closed_open(-5, 4)` and built in function `range(-5, 4)`,
|
|
3135
|
+
- `({"Excluded": 1}, {"Excluded": 2.5})` is equivalent to `open(1, 2.5)`,
|
|
3136
|
+
- `({"Included": -1}, "Unbounded")` is equivalent to `at_least(-1)`.
|
|
3137
|
+
- `(5, "Unbounded")` is **INVALID**; `5` must be bound object.
|
|
3138
|
+
5. The range object: A dictionary of form `{"start": lb, "end": ub}`, where both `lb` and `ub` are the bound object described as above.
|
|
3139
|
+
|
|
3140
|
+
Examples
|
|
3141
|
+
---------
|
|
3142
|
+
```python
|
|
3143
|
+
>>> import jijmodeling as jm
|
|
3144
|
+
>>> import builtins
|
|
3145
|
+
>>> N = jm.Placeholder("N", dtype=jm.DataType.INTEGER)
|
|
3146
|
+
>>> c = jm.Placeholder("c", dtype=jm.DataType.FLOAT, shape=(N,))
|
|
3147
|
+
>>> x = jm.BinaryVar("x", shape=(N,))
|
|
3148
|
+
>>> i = jm.Element("i", belong_to=N)
|
|
3149
|
+
|
|
3150
|
+
>>> problem = jm.Problem("problem")
|
|
3151
|
+
>>> problem += jm.sum(i, c[i] * x[i])
|
|
3152
|
+
|
|
3153
|
+
>>> inputs = problem.generate_random_dataset(
|
|
3154
|
+
... options={
|
|
3155
|
+
... 'N': {"value": builtins.range(10, 20)},
|
|
3156
|
+
... 'c': {"value": jm.range.value.closed(-1.0, 1.0)}
|
|
3157
|
+
... # You can also specify "size" for the range of jagged array dimension size.
|
|
3158
|
+
... },
|
|
3159
|
+
... seed=123 # omittable
|
|
3160
|
+
... )
|
|
3161
|
+
>>> assert set(inputs.keys()) == {"N", "c"}
|
|
3162
|
+
>>> inputs
|
|
3163
|
+
{'N': 11.0, 'c': array([ 0.93914459, -0.06511935, -0.7460324 , -0.32443706, 0.99981451,
|
|
3164
|
+
-0.24407535, 0.31329469, 0.52206453, -0.1291936 , 0.30443087,
|
|
3165
|
+
0.53125838])}
|
|
3166
|
+
|
|
3167
|
+
```
|
|
3168
|
+
"""
|
|
3169
|
+
...
|
|
3170
|
+
|
|
3171
|
+
def generate_random_instance(self, default = ...,options = ...,seed = ...) -> typing.Any:
|
|
3172
|
+
r"""
|
|
3173
|
+
Generates random `ommx.v1.Instance` for a given problem.
|
|
3174
|
+
See also `InstanceDataValue.generate_random_dataset`.
|
|
3175
|
+
|
|
3176
|
+
Args
|
|
3177
|
+
-----
|
|
3178
|
+
- `options` (optional): a dictionary of range parameters for each separate placeholders. The key must be the name of the placeholder and the value must be range parameter (as described in "Range Parameters and Range Syntax" section in :func:`~jijmodeling.Problem.generate_random_dataset`).
|
|
3179
|
+
- `default` (optional): default range parameters for placeholders which is not specified in `options`.
|
|
3180
|
+
- `seed` (optional): seed for random number generation.
|
|
3181
|
+
|
|
3182
|
+
Returns
|
|
3183
|
+
--------
|
|
3184
|
+
`instance`: The OMMX v1 instance object.
|
|
3185
|
+
|
|
3186
|
+
Examples
|
|
3187
|
+
---------
|
|
3188
|
+
```python
|
|
3189
|
+
>>> import jijmodeling as jm
|
|
3190
|
+
>>> import builtins
|
|
3191
|
+
>>> import ommx.v1
|
|
3192
|
+
>>> N = jm.Placeholder("N", dtype=jm.DataType.INTEGER)
|
|
3193
|
+
>>> c = jm.Placeholder("c", dtype=jm.DataType.FLOAT, shape=(N,))
|
|
3194
|
+
>>> x = jm.BinaryVar("x", shape=(N,))
|
|
3195
|
+
>>> i = jm.Element("i", belong_to=N)
|
|
3196
|
+
|
|
3197
|
+
>>> problem = jm.Problem("problem")
|
|
3198
|
+
>>> problem += jm.sum(i, c[i] * x[i])
|
|
3199
|
+
|
|
3200
|
+
>>> instance = problem.generate_random_instance(
|
|
3201
|
+
... options={
|
|
3202
|
+
... 'N': {"value": builtins.range(10, 20)},
|
|
3203
|
+
... 'c': {"value": jm.range.value.closed(-1.0, 1.0)}
|
|
3204
|
+
... },
|
|
3205
|
+
... seed=123
|
|
3206
|
+
... )
|
|
3207
|
+
>>> assert type(instance) is ommx.v1.Instance
|
|
3208
|
+
|
|
3209
|
+
```
|
|
3210
|
+
"""
|
|
3061
3211
|
...
|
|
3062
3212
|
|
|
3063
3213
|
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# `jijmodeling.jijmodeling` is a module corresponding to the shared library
|
|
2
|
+
# created by PyO3,
|
|
3
|
+
# and `jijmodeling.jijmodeling.range` is its submodule defined dynamically
|
|
4
|
+
# while the initialization of the shared library.
|
|
5
|
+
#
|
|
6
|
+
# This file defines a new sub-module `jijmodeling.range`,
|
|
7
|
+
# and exposes all the components in `jijmodeling.jijmodeling.range`
|
|
8
|
+
#
|
|
9
|
+
|
|
10
|
+
from .._jijmodeling import range as _range # type: ignore
|
|
11
|
+
import sys
|
|
12
|
+
|
|
13
|
+
for component in _range.__all__:
|
|
14
|
+
setattr(sys.modules[__name__], component, getattr(_range, component))
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# This file is automatically generated by pyo3_stub_gen
|
|
2
|
+
# ruff: noqa: E501, F401
|
|
3
|
+
|
|
4
|
+
import typing
|
|
5
|
+
from . import size
|
|
6
|
+
from . import value
|
|
7
|
+
|
|
8
|
+
def at_least(bd:int | float) -> dict[str, dict[str, int] | typing.Literal['Unbounded']] | dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
9
|
+
r"""
|
|
10
|
+
`at_least(lb)` returns a closed interval $[\mathtt{lb}, \infty)$; that is, $x \in \mathtt{at\_least(lb)} \iff x \geq \mathtt{lb}$.
|
|
11
|
+
"""
|
|
12
|
+
...
|
|
13
|
+
|
|
14
|
+
def at_most(bd:int | float) -> dict[str, dict[str, int] | typing.Literal['Unbounded']] | dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
15
|
+
r"""
|
|
16
|
+
`at_most(ub)` returns a closed interval $(-\infty, \mathtt{ub}]$; that is, $x \in \mathtt{at\_most(ub)} \iff x \leq \mathtt{ub}$.
|
|
17
|
+
"""
|
|
18
|
+
...
|
|
19
|
+
|
|
20
|
+
def closed(lb:int | float,ub:int | float) -> dict[str, dict[str, int] | typing.Literal['Unbounded']] | dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
21
|
+
r"""
|
|
22
|
+
`closed(lb, ub)` returns a closed interval $[\mathtt{lb}, \mathtt{ub}]$; that is, $x \in \mathtt{closed(lb, ub)} \iff \mathtt{lb} \leq x \leq \mathtt{ub}$
|
|
23
|
+
"""
|
|
24
|
+
...
|
|
25
|
+
|
|
26
|
+
def closed_open(lb:int | float,ub:int | float) -> dict[str, dict[str, int] | typing.Literal['Unbounded']] | dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
27
|
+
r"""
|
|
28
|
+
`closed_open(lb, ub)` returns a upper half-open interval $[\mathtt{lb}, \mathtt{ub})$; that is, $x \in \mathtt{closed\_open(lb, ub)} \iff \mathtt{lb} \leq x < \mathtt{ub}$. For size range, it is same as the python's standard `range(lb, ub)` function.
|
|
29
|
+
"""
|
|
30
|
+
...
|
|
31
|
+
|
|
32
|
+
def greater_than(bd:int | float) -> dict[str, dict[str, int] | typing.Literal['Unbounded']] | dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
33
|
+
r"""
|
|
34
|
+
`greater_than(lb)` returns an open interval $(\mathtt{lb}, \infty)$; that is, $x \in \mathtt{greater\_than(lb)} \iff x > \mathtt{lb}$.
|
|
35
|
+
"""
|
|
36
|
+
...
|
|
37
|
+
|
|
38
|
+
def less_than(bd:int | float) -> dict[str, dict[str, int] | typing.Literal['Unbounded']] | dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
39
|
+
r"""
|
|
40
|
+
`less_than(ub)` returns an open interval $(-\infty, \mathtt{ub})$; that is, $x \in \mathtt{less\_than(ub)} \iff x < \mathtt{ub}$. For size range, it is same as the python's standard `range(ub)` function.
|
|
41
|
+
"""
|
|
42
|
+
...
|
|
43
|
+
|
|
44
|
+
def open(lb:int | float,ub:int | float) -> dict[str, dict[str, int] | typing.Literal['Unbounded']] | dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
45
|
+
r"""
|
|
46
|
+
`open(lb, ub)` returns an open interval $(\mathtt{lb}, \mathtt{ub})$; that is, $x \in \mathtt{open(lb, ub)} \iff \mathtt{lb} < x < \mathtt{ub}$
|
|
47
|
+
"""
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
def open_closed(lb:int | float,ub:int | float) -> dict[str, dict[str, int] | typing.Literal['Unbounded']] | dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
51
|
+
r"""
|
|
52
|
+
`open_closed(lb, ub)` returns a lower half-open interval $(\mathtt{lb}, \mathtt{ub}]$; that is, $x \in \mathtt{open\_closed(lb, ub)} \iff \mathtt{lb} < x \leq \mathtt{ub}$.
|
|
53
|
+
"""
|
|
54
|
+
...
|
|
55
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# `jijmodeling.jijmodeling` is a module corresponding to the shared library
|
|
2
|
+
# created by PyO3,
|
|
3
|
+
# and `jijmodeling.jijmodeling.range` is its submodule defined dynamically
|
|
4
|
+
# while the initialization of the shared library.
|
|
5
|
+
#
|
|
6
|
+
# This file defines a new sub-module `jijmodeling.range`,
|
|
7
|
+
# and exposes all the components in `jijmodeling.jijmodeling.range`
|
|
8
|
+
#
|
|
9
|
+
|
|
10
|
+
from . import size as _size # type: ignore
|
|
11
|
+
import sys
|
|
12
|
+
|
|
13
|
+
for component in _size.__all__: # type: ignore
|
|
14
|
+
setattr(sys.modules[__name__], component, getattr(_size, component))
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# This file is automatically generated by pyo3_stub_gen
|
|
2
|
+
# ruff: noqa: E501, F401
|
|
3
|
+
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
def at_least(arg:int) -> dict[str, dict[str, int] | typing.Literal['Unbounded']]:
|
|
7
|
+
r"""
|
|
8
|
+
`at_least(lb)` returns a closed interval $[\mathtt{lb}, \infty)$; that is, $x \in \mathtt{at\_least(lb)} \iff x \geq \mathtt{lb}$.
|
|
9
|
+
"""
|
|
10
|
+
...
|
|
11
|
+
|
|
12
|
+
def at_most(bd:int) -> dict[str, dict[str, int] | typing.Literal['Unbounded']]:
|
|
13
|
+
r"""
|
|
14
|
+
`at_most(ub)` returns a closed interval $(-\infty, \mathtt{ub}]$; that is, $x \in \mathtt{at\_most(ub)} \iff x \leq \mathtt{ub}$.
|
|
15
|
+
"""
|
|
16
|
+
...
|
|
17
|
+
|
|
18
|
+
def closed(lb:int,ub:int) -> dict[str, dict[str, int] | typing.Literal['Unbounded']]:
|
|
19
|
+
r"""
|
|
20
|
+
`closed(lb, ub)` returns a closed interval $[\mathtt{lb}, \mathtt{ub}]$; that is, $x \in \mathtt{closed(lb, ub)} \iff \mathtt{lb} \leq x \leq \mathtt{ub}$
|
|
21
|
+
"""
|
|
22
|
+
...
|
|
23
|
+
|
|
24
|
+
def closed_open(lb:int,ub:int) -> dict[str, dict[str, int] | typing.Literal['Unbounded']]:
|
|
25
|
+
r"""
|
|
26
|
+
`closed_open(lb, ub)` returns a upper half-open interval $[\mathtt{lb}, \mathtt{ub})$; that is, $x \in \mathtt{closed\_open(lb, ub)} \iff \mathtt{lb} \leq x < \mathtt{ub}$. For size range, it is same as the python's standard `range(lb, ub)` function.
|
|
27
|
+
"""
|
|
28
|
+
...
|
|
29
|
+
|
|
30
|
+
def greater_than(arg:int) -> dict[str, dict[str, int] | typing.Literal['Unbounded']]:
|
|
31
|
+
r"""
|
|
32
|
+
`greater_than(lb)` returns an open interval $(\mathtt{lb}, \infty)$; that is, $x \in \mathtt{greater\_than(lb)} \iff x > \mathtt{lb}$.
|
|
33
|
+
"""
|
|
34
|
+
...
|
|
35
|
+
|
|
36
|
+
def less_than(bd:int) -> dict[str, dict[str, int] | typing.Literal['Unbounded']]:
|
|
37
|
+
r"""
|
|
38
|
+
`less_than(ub)` returns an open interval $(-\infty, \mathtt{ub})$; that is, $x \in \mathtt{less\_than(ub)} \iff x < \mathtt{ub}$. For size range, it is same as the python's standard `range(ub)` function.
|
|
39
|
+
"""
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
def open(lb:int,ub:int) -> dict[str, dict[str, int] | typing.Literal['Unbounded']]:
|
|
43
|
+
r"""
|
|
44
|
+
`open(lb, ub)` returns an open interval $(\mathtt{lb}, \mathtt{ub})$; that is, $x \in \mathtt{open(lb, ub)} \iff \mathtt{lb} < x < \mathtt{ub}$
|
|
45
|
+
"""
|
|
46
|
+
...
|
|
47
|
+
|
|
48
|
+
def open_closed(lb:int,ub:int) -> dict[str, dict[str, int] | typing.Literal['Unbounded']]:
|
|
49
|
+
r"""
|
|
50
|
+
`open_closed(lb, ub)` returns a lower half-open interval $(\mathtt{lb}, \mathtt{ub}]$; that is, $x \in \mathtt{open\_closed(lb, ub)} \iff \mathtt{lb} < x \leq \mathtt{ub}$.
|
|
51
|
+
"""
|
|
52
|
+
...
|
|
53
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# `jijmodeling.jijmodeling` is a module corresponding to the shared library
|
|
2
|
+
# created by PyO3,
|
|
3
|
+
# and `jijmodeling.jijmodeling.range` is its submodule defined dynamically
|
|
4
|
+
# while the initialization of the shared library.
|
|
5
|
+
#
|
|
6
|
+
# This file defines a new sub-module `jijmodeling.range`,
|
|
7
|
+
# and exposes all the components in `jijmodeling.jijmodeling.range`
|
|
8
|
+
#
|
|
9
|
+
|
|
10
|
+
from . import value as _value # type: ignore
|
|
11
|
+
import sys
|
|
12
|
+
|
|
13
|
+
for component in _value.__all__: # type: ignore
|
|
14
|
+
setattr(sys.modules[__name__], component, getattr(_value, component))
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# This file is automatically generated by pyo3_stub_gen
|
|
2
|
+
# ruff: noqa: E501, F401
|
|
3
|
+
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
def at_least(arg:float) -> dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
7
|
+
r"""
|
|
8
|
+
`at_least(lb)` returns a closed interval $[\mathtt{lb}, \infty)$; that is, $x \in \mathtt{at\_least(lb)} \iff x \geq \mathtt{lb}$.
|
|
9
|
+
"""
|
|
10
|
+
...
|
|
11
|
+
|
|
12
|
+
def at_most(bd:float) -> dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
13
|
+
r"""
|
|
14
|
+
`at_most(ub)` returns a closed interval $(-\infty, \mathtt{ub}]$; that is, $x \in \mathtt{at\_most(ub)} \iff x \leq \mathtt{ub}$.
|
|
15
|
+
"""
|
|
16
|
+
...
|
|
17
|
+
|
|
18
|
+
def closed(lb:float,ub:float) -> dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
19
|
+
r"""
|
|
20
|
+
`closed(lb, ub)` returns a closed interval $[\mathtt{lb}, \mathtt{ub}]$; that is, $x \in \mathtt{closed(lb, ub)} \iff \mathtt{lb} \leq x \leq \mathtt{ub}$
|
|
21
|
+
"""
|
|
22
|
+
...
|
|
23
|
+
|
|
24
|
+
def closed_open(lb:float,ub:float) -> dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
25
|
+
r"""
|
|
26
|
+
`closed_open(lb, ub)` returns a upper half-open interval $[\mathtt{lb}, \mathtt{ub})$; that is, $x \in \mathtt{closed\_open(lb, ub)} \iff \mathtt{lb} \leq x < \mathtt{ub}$. For size range, it is same as the python's standard `range(lb, ub)` function.
|
|
27
|
+
"""
|
|
28
|
+
...
|
|
29
|
+
|
|
30
|
+
def greater_than(arg:float) -> dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
31
|
+
r"""
|
|
32
|
+
`greater_than(lb)` returns an open interval $(\mathtt{lb}, \infty)$; that is, $x \in \mathtt{greater\_than(lb)} \iff x > \mathtt{lb}$.
|
|
33
|
+
"""
|
|
34
|
+
...
|
|
35
|
+
|
|
36
|
+
def less_than(bd:float) -> dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
37
|
+
r"""
|
|
38
|
+
`less_than(ub)` returns an open interval $(-\infty, \mathtt{ub})$; that is, $x \in \mathtt{less\_than(ub)} \iff x < \mathtt{ub}$. For size range, it is same as the python's standard `range(ub)` function.
|
|
39
|
+
"""
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
def open(lb:float,ub:float) -> dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
43
|
+
r"""
|
|
44
|
+
`open(lb, ub)` returns an open interval $(\mathtt{lb}, \mathtt{ub})$; that is, $x \in \mathtt{open(lb, ub)} \iff \mathtt{lb} < x < \mathtt{ub}$
|
|
45
|
+
"""
|
|
46
|
+
...
|
|
47
|
+
|
|
48
|
+
def open_closed(lb:float,ub:float) -> dict[str, dict[str, float] | typing.Literal['Unbounded']]:
|
|
49
|
+
r"""
|
|
50
|
+
`open_closed(lb, ub)` returns a lower half-open interval $(\mathtt{lb}, \mathtt{ub}]$; that is, $x \in \mathtt{open\_closed(lb, ub)} \iff \mathtt{lb} < x \leq \mathtt{ub}$.
|
|
51
|
+
"""
|
|
52
|
+
...
|
|
53
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: jijmodeling
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.10.0
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: Operating System :: POSIX :: Linux
|
|
6
6
|
Classifier: Operating System :: MacOS
|
|
@@ -18,9 +18,10 @@ Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
|
18
18
|
Requires-Dist: numpy
|
|
19
19
|
Requires-Dist: pandas
|
|
20
20
|
Requires-Dist: orjson >=3.8.0, <4.0.0
|
|
21
|
-
Requires-Dist: ommx >=1.
|
|
21
|
+
Requires-Dist: ommx >=1.5.1, <2.0.0
|
|
22
22
|
Requires-Dist: pyright ; extra == 'test'
|
|
23
23
|
Requires-Dist: pytest ; extra == 'test'
|
|
24
|
+
Requires-Dist: hypothesis ; extra == 'test'
|
|
24
25
|
Requires-Dist: twine ; extra == 'test'
|
|
25
26
|
Requires-Dist: pkginfo >=1.10.0 ; extra == 'test'
|
|
26
27
|
Provides-Extra: test
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
jijmodeling-1.10.0.dist-info/METADATA,sha256=PsOASI4WeW4WOpYimChiPlvmYC6-LhOZq8rKZOOt1us,13089
|
|
2
|
+
jijmodeling-1.10.0.dist-info/WHEEL,sha256=dFcu9qOsa7YDFSHa8_VgUseX7dlAZ67iGT1C1h1z-T8,95
|
|
3
|
+
jijmodeling-1.10.0.dist-info/licenses/LICENSE.txt,sha256=llUjgcEN5bUeFlj1RqxJxDMxUnlYvowLsldCF6Lwq8c,3445
|
|
4
|
+
jijmodeling/dataset.py,sha256=L8yUjKp81m6_CoSfdPJMoJmlCQ_gf7n8okURTKRMXaw,190
|
|
5
|
+
jijmodeling/dataset.pyi,sha256=CQKCr2hAJ2BX_zqI4tN9PUU_3zSkQ35lWIvsIVIBdwQ,4110
|
|
6
|
+
jijmodeling/experimental.py,sha256=WWmxJzkyx_EYac1zmxflmFND191-xbVVXEdqot2VrM4,588
|
|
7
|
+
jijmodeling/experimental.pyi,sha256=xEzVzawfe8a0xUNQ2ml6RK5CUbcuNGIoC-n-Nxd8P0E,9319
|
|
8
|
+
jijmodeling/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
jijmodeling/range/size.py,sha256=F-cc3hLTAxUQo4umo6qFM5crGYdcWIEFLvWO963TyFY,542
|
|
10
|
+
jijmodeling/range/size.pyi,sha256=3ov-8EUEY-qnRjjcqGbtP5PXRPqgREnjHTnCNiL9Xlg,2395
|
|
11
|
+
jijmodeling/range/value.py,sha256=VCtUjzL4vfOo-yqSEmfLD1JZ98d73NYPuzohWDu5R2Q,546
|
|
12
|
+
jijmodeling/range/value.pyi,sha256=1dm_bYaWuGyFw3Mo0FMwMtvd_2SjVUB69edxMo3A0Qg,2435
|
|
13
|
+
jijmodeling/range/__init__.py,sha256=Dh-hTX2LMtTaM-Aps6Z4KfV28EoLI3vfkiRr4lQu13s,543
|
|
14
|
+
jijmodeling/range/__init__.pyi,sha256=EOiepKqfYNuSJP9sdri0fx1airxxVySSCtMSjU4QcAU,3010
|
|
15
|
+
jijmodeling/__init__.py,sha256=jJ6o5wp3MPAP1uR3dqSvjaXG57t1IwcS8ojqPpZL-gU,45
|
|
16
|
+
jijmodeling/__init__.pyi,sha256=KFqeZV1ODzId-EHG6nQMgS1bPx3geNOax-3EzDnpc0Q,147834
|
|
17
|
+
jijmodeling/_jijmodeling.cp310-win_amd64.pyd,sha256=TMANZMDVSpO_fbpJi9naVdfArkNvb_7e452_oHgzUlg,8097792
|
|
18
|
+
jijmodeling-1.10.0.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
jijmodeling-1.8.1.dist-info/METADATA,sha256=XcHhbilKB0X8eoZa650qV8KFdglmctYAOgDGm-g-SaQ,13044
|
|
2
|
-
jijmodeling-1.8.1.dist-info/WHEEL,sha256=dFcu9qOsa7YDFSHa8_VgUseX7dlAZ67iGT1C1h1z-T8,95
|
|
3
|
-
jijmodeling-1.8.1.dist-info/licenses/LICENSE.txt,sha256=llUjgcEN5bUeFlj1RqxJxDMxUnlYvowLsldCF6Lwq8c,3445
|
|
4
|
-
jijmodeling/dataset.py,sha256=L8yUjKp81m6_CoSfdPJMoJmlCQ_gf7n8okURTKRMXaw,190
|
|
5
|
-
jijmodeling/dataset.pyi,sha256=CQKCr2hAJ2BX_zqI4tN9PUU_3zSkQ35lWIvsIVIBdwQ,4110
|
|
6
|
-
jijmodeling/experimental.py,sha256=WWmxJzkyx_EYac1zmxflmFND191-xbVVXEdqot2VrM4,588
|
|
7
|
-
jijmodeling/experimental.pyi,sha256=xEzVzawfe8a0xUNQ2ml6RK5CUbcuNGIoC-n-Nxd8P0E,9319
|
|
8
|
-
jijmodeling/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
jijmodeling/__init__.py,sha256=jJ6o5wp3MPAP1uR3dqSvjaXG57t1IwcS8ojqPpZL-gU,45
|
|
10
|
-
jijmodeling/__init__.pyi,sha256=LXRHeFDzSMdcxAIonLhqySdi2AY0wjfV7vjA6g02hhg,139034
|
|
11
|
-
jijmodeling/_jijmodeling.cp310-win_amd64.pyd,sha256=HaiQvu8fh1piDQzoDT4sMRKJY3sSLnp7Xpgci83b1FM,7895040
|
|
12
|
-
jijmodeling-1.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|