Coordinate Utilities
get_points_in_box(lbs, ubs)
Using a Cartesian product, returns a list of integer points in some region.
Parameters
Iterable[Number]
description
Iterable[Number]
description
Returns
List[List[Number]] description
Examples
get_points_in_box([0,1], [1,2]) [[0, 1], [0, 2], [1, 1], [1, 2]]
Source code in pylattica/core/coordinate_utils.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
get_points_in_cube(lb, ub, dim)
Returns the list of all integer separated points in a box of dimension dim with lower bound and upper bounds in each direction specified by lb and ub.
Parameters
int
the lower bound of the cube
int
the uppwer bound of the cube
Returns
List[List[int]] A list of points in the cube
Source code in pylattica/core/coordinate_utils.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|