pyclustering.container.cftree.leaf_node Class Reference

Represents clustering feature leaf node. More...

+ Inheritance diagram for pyclustering.container.cftree.leaf_node:
+ Collaboration diagram for pyclustering.container.cftree.leaf_node:

Public Member Functions

def entries (self)
 
def __init__ (self, feature, parent, entries)
 Create CF Leaf node. More...
 
def __repr__ (self)
 
def __str__ (self)
 
def insert_entry (self, entry)
 Insert new clustering feature to the leaf node. More...
 
def merge (self, node)
 Merge leaf node to the current. More...
 
def get_farthest_entries (self, type_measurement)
 Find pair of farthest entries of the node. More...
 
def get_nearest_index_entry (self, entry, type_measurement)
 Find nearest index of nearest entry of node for the specified entry. More...
 
def get_nearest_entry (self, entry, type_measurement)
 Find nearest entry of node for the specified entry. More...
 
- Public Member Functions inherited from pyclustering.container.cftree.cfnode
def __init__ (self, feature, parent)
 Constructor of abstract CF node. More...
 
def __repr__ (self)
 
def __str__ (self)
 
def get_distance (self, node, type_measurement)
 Calculates distance between nodes in line with specified type measurement. More...
 

Public Attributes

 type
 Node type in CF tree that is CFNODE_LEAF for leaf node. More...
 
- Public Attributes inherited from pyclustering.container.cftree.cfnode
 feature
 Clustering feature of the node. More...
 
 parent
 Pointer to the parent node (None for root). More...
 
 type
 Type node (leaf or non-leaf). More...
 

Detailed Description

Represents clustering feature leaf node.

Definition at line 551 of file cftree.py.

Constructor & Destructor Documentation

◆ __init__()

def pyclustering.container.cftree.leaf_node.__init__ (   self,
  feature,
  parent,
  entries 
)

Create CF Leaf node.

Parameters
[in]feature(cfentry): Clustering feature of the created node.
[in]parent(non_leaf_node): Parent of the created node.
[in]entries(list): List of entries of the node.

Definition at line 566 of file cftree.py.

Member Function Documentation

◆ __repr__()

def pyclustering.container.cftree.leaf_node.__repr__ (   self)
Returns
(string) Default leaf node represenation.

Definition at line 584 of file cftree.py.

Referenced by pyclustering.container.kdtree.node.__str__().

◆ __str__()

def pyclustering.container.cftree.leaf_node.__str__ (   self)
Returns
(string) String leaf node representation.

Definition at line 597 of file cftree.py.

◆ entries()

◆ get_farthest_entries()

def pyclustering.container.cftree.leaf_node.get_farthest_entries (   self,
  type_measurement 
)

Find pair of farthest entries of the node.

Parameters
[in]type_measurement(measurement_type): Measurement type that is used for obtaining farthest entries.
Returns
(list) Pair of farthest entries of the node that are represented by list.

Definition at line 632 of file cftree.py.

◆ get_nearest_entry()

def pyclustering.container.cftree.leaf_node.get_nearest_entry (   self,
  entry,
  type_measurement 
)

Find nearest entry of node for the specified entry.

Parameters
[in]entry(cfentry): Entry that is used for calculation distance.
[in]type_measurement(measurement_type): Measurement type that is used for obtaining nearest entry to the specified.
Returns
(cfentry) Nearest entry of node for the specified entry.

Definition at line 684 of file cftree.py.

◆ get_nearest_index_entry()

def pyclustering.container.cftree.leaf_node.get_nearest_index_entry (   self,
  entry,
  type_measurement 
)

Find nearest index of nearest entry of node for the specified entry.

Parameters
[in]entry(cfentry): Entry that is used for calculation distance.
[in]type_measurement(measurement_type): Measurement type that is used for obtaining nearest entry to the specified.
Returns
(uint) Index of nearest entry of node for the specified entry.

Definition at line 661 of file cftree.py.

◆ insert_entry()

def pyclustering.container.cftree.leaf_node.insert_entry (   self,
  entry 
)

Insert new clustering feature to the leaf node.

Parameters
[in]entry(cfentry): Clustering feature.

Definition at line 605 of file cftree.py.

◆ merge()

def pyclustering.container.cftree.leaf_node.merge (   self,
  node 
)

Merge leaf node to the current.

Parameters
[in]node(leaf_node): Leaf node that should be merged with current.

Definition at line 617 of file cftree.py.

Member Data Documentation

◆ type

pyclustering.container.cftree.leaf_node.type

Node type in CF tree that is CFNODE_LEAF for leaf node.

Definition at line 579 of file cftree.py.


The documentation for this class was generated from the following file: