|
MPSolve 3.2.2
|
Data structures for cluster analysis and some accessors and internal functions. More...
#include <mps/mps.h>Go to the source code of this file.
Classes | |
| struct | mps_root |
This struct represent a root inside of a mps_cluster. More... | |
| struct | mps_cluster |
A cluster of mps_roots. More... | |
| struct | mps_cluster_item |
| Cluster held in a mps_clusterization. More... | |
| struct | mps_clusterization |
A list of mps_cluster. More... | |
Macros | |
| #define | MPS_ALL_CLUSTERS -1 |
Functions | |
| void | mps_cluster_reset (mps_context *s) |
Reset cluster structure information contained in s. After the call to this routine the roots will be considered as a unique big cluster, discarding every information present before. | |
| void | mps_fcluster (mps_context *s, double *frad, int nf) |
| void | mps_dcluster (mps_context *s, rdpe_t *drad, int nf) |
Perform cluster analysis to each existing cluster by applying mps_xcluster to each existing cluster. | |
| void | mps_mcluster (mps_context *s, rdpe_t *drad, int nf) |
Perform cluster analysis to each existing cluster by applying mps_xcluster to each existing cluster. | |
| void | mps_debug_cluster_structure (mps_context *s) |
| void | mps_cluster_analysis (mps_context *ctx, mps_polynomial *p) |
| mps_cluster * | mps_cluster_empty (mps_context *s) |
| Get an empty mps_cluster, with no roots. | |
| mps_cluster * | mps_cluster_with_root (mps_context *s, long int root_index) |
| Create a cluster containing only the selected root. | |
| void | mps_cluster_free (mps_context *s, mps_cluster *cluster) |
| Free a previously allocated cluster with all the roots in it. | |
| mps_root * | mps_cluster_insert_root (mps_context *s, mps_cluster *cluster, long int root_index) |
| Insert a root in a cluster. | |
| void | mps_cluster_remove_root (mps_context *s, mps_cluster *cluster, mps_root *root) |
| Remove a root from a cluster. | |
| mps_cluster * | mps_cluster_join (mps_context *s, mps_cluster *cluster_a, mps_cluster *cluster_b) |
| Join two cluster in one big cluster containing the roots of both. Please note that the cluster must not overlap. | |
| mps_clusterization * | mps_clusterization_empty (mps_context *s) |
| Create a new empty clusterization. | |
| mps_cluster_item * | mps_clusterization_insert_cluster (mps_context *s, mps_clusterization *c, mps_cluster *cluster) |
| Insert a new cluster into a root clusterization. | |
| void | mps_clusterization_pop_cluster (mps_context *s, mps_clusterization *c, mps_cluster_item *cluster_item) |
| Pop out a cluster from a clusterization. | |
| void | mps_clusterization_remove_cluster (mps_context *s, mps_clusterization *c, mps_cluster_item *cluster_item) |
| Remove a cluster item from a clusterization, freeing it. | |
| void | mps_clusterization_free (mps_context *s, mps_clusterization *c) |
| Free a clusterization and all the cluster in it. | |
| void | mps_clusterization_detach_clusters (mps_context *s, mps_clusterization *c) |
| void | mps_clusterization_reassemble_clusters (mps_context *s, mps_clusterization *c) |
| void | mps_cluster_detach (mps_context *s, mps_cluster *cluster) |
Data structures for cluster analysis and some accessors and internal functions.
| mps_cluster * mps_cluster_empty | ( | mps_context * | s | ) |
Get an empty mps_cluster, with no roots.
| s | The mps_context of the current computation. |
| void mps_cluster_free | ( | mps_context * | s, |
| mps_cluster * | cluster ) |
Free a previously allocated cluster with all the roots in it.
| s | The mps_context of the current computation. |
| cluster | The cluster to free. |
| mps_root * mps_cluster_insert_root | ( | mps_context * | s, |
| mps_cluster * | cluster, | ||
| long int | root_index ) |
Insert a root in a cluster.
| s | The mps_context of the current computation. |
| cluster | The cluster in which the root must be inserted. |
| root_index | The index of the root to insert. |
| mps_cluster * mps_cluster_join | ( | mps_context * | s, |
| mps_cluster * | cluster_a, | ||
| mps_cluster * | cluster_b ) |
Join two cluster in one big cluster containing the roots of both. Please note that the cluster must not overlap.
| s | The mps_context of the current computation. |
| cluster_a | The first cluster |
| cluster_b | The second cluster |
| void mps_cluster_remove_root | ( | mps_context * | s, |
| mps_cluster * | cluster, | ||
| mps_root * | root ) |
Remove a root from a cluster.
| s | The mps_context of the current computation. |
| cluster | The cluster from which the root must be removed. |
| root | The root to remove. |
Please note the the root specified must be in the cluster, otherwise an assertion error or segmentation fault will be triggered.
| void mps_cluster_reset | ( | mps_context * | s | ) |
Reset cluster structure information contained in s. After the call to this routine the roots will be considered as a unique big cluster, discarding every information present before.
| s | the mps_context pointer. |
| mps_cluster * mps_cluster_with_root | ( | mps_context * | s, |
| long int | root_index ) |
Create a cluster containing only the selected root.
| s | The mps_context of the current computation. |
| root_index | The root that must be in the cluster. |
| mps_clusterization * mps_clusterization_empty | ( | mps_context * | s | ) |
Create a new empty clusterization.
| s | The mps_context of the current computation. |
| void mps_clusterization_free | ( | mps_context * | s, |
| mps_clusterization * | c ) |
Free a clusterization and all the cluster in it.
| s | The mps_context of the current computation. |
| c | The clusterization to free. |
| mps_cluster_item * mps_clusterization_insert_cluster | ( | mps_context * | s, |
| mps_clusterization * | c, | ||
| mps_cluster * | cluster ) |
Insert a new cluster into a root clusterization.
| s | The mps_context of the current computation. |
| c | The clusterization in which the cluster should be inserted. |
| cluster | The cluster that should be inserted. |
| void mps_clusterization_pop_cluster | ( | mps_context * | s, |
| mps_clusterization * | c, | ||
| mps_cluster_item * | cluster_item ) |
Pop out a cluster from a clusterization.
| s | The mps_context of the current computation. |
| c | The clusterization from which the cluster_item should be popped. |
| cluster_item | The cluster item to remove. |
| void mps_clusterization_remove_cluster | ( | mps_context * | s, |
| mps_clusterization * | c, | ||
| mps_cluster_item * | cluster_item ) |
Remove a cluster item from a clusterization, freeing it.
| s | The mps_context of the current computation. |
| c | The clusterization from where the cluster_item should be removed. |
| cluster_item | The cluster item to remove. |
| void mps_dcluster | ( | mps_context * | s, |
| rdpe_t * | drad, | ||
| int | nf ) |
Perform cluster analysis to each existing cluster by applying mps_xcluster to each existing cluster.
Rebuild the vectors s->clust, s->punt, and the integer s->nclust.
| void mps_fcluster | ( | mps_context * | s, |
| double * | frad, | ||
| int | nf ) |
This subroutine makes cluster analysis, i.e., detects overlapping disks, where two disks overlap if the distances of their centers is less than the sum of their radii multiplied by nf.
Observe that 

This routine set the vector clust so that it contains the indices of the disks in each overlapping group, while punt[i] points to the index of clust where the i-th group starts. Moreover m_clust[i] contains the multiplicity of the i-th cluster. nclust is the number of clusters.
| s | The mps_context associated with the current computaion. |
| frad | The vector of radii to use for cluster analysis. |
| nf | see above for a detailed description. |
| void mps_mcluster | ( | mps_context * | s, |
| rdpe_t * | drad, | ||
| int | nf ) |
Perform cluster analysis to each existing cluster by applying mps_xcluster to each existing cluster.
Rebuild the vectors s->clust, s->punt, and the integer s->nclust.