Geometrical description of BANG block in data space.
More...
|
def | __init__ (self, max_corner, min_corner) |
| Creates spatial block in data space. More...
|
|
def | __str__ (self) |
| Returns string block description. More...
|
|
def | __contains__ (self, point) |
| Point is considered as contained if it lies in block (belong to it). More...
|
|
def | get_corners (self) |
| Return spatial description of current block. More...
|
|
def | get_volume (self) |
| Returns volume of current block. More...
|
|
def | split (self, dimension) |
| Split current block into two spatial blocks in specified dimension. More...
|
|
def | is_neighbor (self, block) |
| Performs calculation to identify whether specified block is neighbor of current block. More...
|
|
Geometrical description of BANG block in data space.
Provides services related to spatial functionality and used by bang_block
- See also
- bang_block
Definition at line 599 of file bang.py.
◆ __init__()
def pyclustering.cluster.bang.spatial_block.__init__ |
( |
|
self, |
|
|
|
max_corner, |
|
|
|
min_corner |
|
) |
| |
Creates spatial block in data space.
- Parameters
-
[in] | max_corner | (array_like): Maximum corner coordinates of the block. |
[in] | min_corner | (array_like): Minimal corner coordinates of the block. |
Definition at line 608 of file bang.py.
◆ __contains__()
def pyclustering.cluster.bang.spatial_block.__contains__ |
( |
|
self, |
|
|
|
point |
|
) |
| |
Point is considered as contained if it lies in block (belong to it).
- Returns
- (bool) True if point is in block, otherwise False.
Definition at line 631 of file bang.py.
◆ __str__()
def pyclustering.cluster.bang.spatial_block.__str__ |
( |
|
self | ) |
|
Returns string block description.
- Returns
- String representation of the block.
Definition at line 621 of file bang.py.
◆ get_corners()
def pyclustering.cluster.bang.spatial_block.get_corners |
( |
|
self | ) |
|
Return spatial description of current block.
- Returns
- (tuple) Pair of maximum and minimum corners (max_corner, min_corner).
Definition at line 645 of file bang.py.
◆ get_volume()
def pyclustering.cluster.bang.spatial_block.get_volume |
( |
|
self | ) |
|
Returns volume of current block.
Volume block has uncommon mining here: for 1D is length of a line, for 2D is square of rectangle, for 3D is volume of 3D figure, and for ND is volume of ND figure.
- Returns
- (double) Volume of current block.
Definition at line 655 of file bang.py.
◆ is_neighbor()
def pyclustering.cluster.bang.spatial_block.is_neighbor |
( |
|
self, |
|
|
|
block |
|
) |
| |
Performs calculation to identify whether specified block is neighbor of current block.
It also considers diagonal blocks as neighbors.
- Parameters
-
[in] | block | (spatial_block): Another block that is check whether it is neighbor. |
- Returns
- (bool) True is blocks are neighbors, False otherwise.
Definition at line 687 of file bang.py.
◆ split()
def pyclustering.cluster.bang.spatial_block.split |
( |
|
self, |
|
|
|
dimension |
|
) |
| |
Split current block into two spatial blocks in specified dimension.
- Parameters
-
[in] | dimension | (uint): Dimension where current block should be split. |
- Returns
- (tuple) Pair of new split blocks from current block.
Definition at line 667 of file bang.py.
The documentation for this class was generated from the following file: