class_docstr: !
  @brief Provides service to change clustering result representation.
  @details There are three general types of representation:
  1. Index List Separation that is defined by `CLUSTER_INDEX_LIST_SEPARATION`, for example `[[0, 1, 2], [3, 4], [5, 6, 7]`.
  2. Index Labeling that is defined by `CLUSTER_INDEX_LABELING`, for example `[0, 0, 0, 1, 1, 2, 2, 2]`.
  3. Object List Separation that is defined by `CLUSTER_OBJECT_LIST_SEPARATION`, for example `[[obj1, obj2, obj3], [obj4, obj5], [obj5, obj6, obj7]`.
  
  There is an example how to covert default Index List Separation to other types:
  @code
      from pyclustering.utils import read_sample
      from pyclustering.samples.definitions import SIMPLE_SAMPLES
  
      from pyclustering.cluster.encoder import type_encoding, cluster_encoder
      from pyclustering.cluster.kmeans import kmeans
  
      # load list of points for cluster analysis
      sample = read_sample(SIMPLE_SAMPLES.SAMPLE_SIMPLE1)
  
      # create instance of K-Means algorithm
      kmeans_instance = kmeans(sample, [[3.0, 5.1], [6.5, 8.6]])
  
      # run cluster analysis and obtain results
      kmeans_instance.process()
      clusters = kmeans_instance.get_clusters()
      print("Index List Separation:", clusters)
  
      # by default k-means returns representation CLUSTER_INDEX_LIST_SEPARATION
      type_repr = kmeans_instance.get_cluster_encoding()
      encoder = cluster_encoder(type_repr, clusters, sample)
  
      # change representation from index list to label list
      encoder.set_encoding(type_encoding.CLUSTER_INDEX_LABELING)
      print("Index Labeling:", encoder.get_clusters())
  
      # change representation from label to object list
      encoder.set_encoding(type_encoding.CLUSTER_OBJECT_LIST_SEPARATION)
      print("Object List Separation:", encoder.get_clusters())
  @endcode
  
  Output of the code above is following:
  @code
      Index List Separation: [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]]
      Index Labeling: [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
      Object List Separation: [[[3.522979, 5.487981], [3.768699, 5.364477], [3.423602, 5.4199], [3.803905, 5.389491], [3.93669, 5.663041]], [[6.968136, 7.755556], [6.750795, 7.269541], [6.593196, 7.850364], [6.978178, 7.60985], [6.554487, 7.498119]]]
  @endcode
  
  If there is no index or object in clusters that exists in an input data then it is going to be marked as `NaN` in
  case of Index Labeling. Here is an example:
  @code
      from pyclustering.cluster.encoder import type_encoding, cluster_encoder
  
      # An input data.
      sample = [[1.0, 1.2], [1.2, 2.3], [114.3, 54.1], [2.2, 1.4], [5.3, 1.3]]
  
      # Clusters do not contains object with index 2 ([114.3, 54.1]) because it is outline.
      clusters = [[0, 1], [3, 4]]
  
      encoder = cluster_encoder(type_encoding.CLUSTER_INDEX_LIST_SEPARATION, clusters, sample)
      encoder.set_encoding(type_encoding.CLUSTER_INDEX_LABELING)
  
      print("Index Labeling:", encoder.get_clusters())
  @endcode
  
  Here is an output of the code above. Pay attention to `NaN` value for the object with index 2 `[114.3, 54.1]`.
  @code
      Index Labeling: [0, 0, nan, 1, 1]
  @endcode
docstr: !
  @brief Returns current cluster representation.
docstr_tok: ["!","@","brief","Returns","current","cluster","representation","."]
code: def get_encoding(self):
      """!
      @brief Returns current cluster representation.
  
      """
      return self.__type_representation
  
file_path: pyclustering/pyclustering/cluster/encoder.py
imports: import math
  from enum import IntEnum
label_desc: Use image node_id 2 for calling the cluster_encoder obj's underlying member method code with example usage: obj.get_encoding() and returns: self