MPSolve
3.2.2
Toggle main menu visibility
Loading...
Searching...
No Matches
cluster.h
Go to the documentation of this file.
1
/*
2
* This file is part of MPSolve 3.2.2
3
*
4
* Copyright (C) 2001-2020, Dipartimento di Matematica "L. Tonelli", Pisa.
5
* License: http://www.gnu.org/licenses/gpl.html GPL version 3 or higher
6
*
7
* Authors:
8
* Leonardo Robol <leonardo.robol@unipi.it>
9
*/
10
17
18
#ifndef MPS_CLUSTER_H_
19
#define MPS_CLUSTER_H_
20
21
#define MPS_ALL_CLUSTERS -1
22
23
#include <
mps/mps.h
>
24
25
MPS_BEGIN_DECLS
26
30
struct
mps_root
{
34
long
int
k
;
35
39
mps_root
*
next
;
40
45
mps_root
*
prev
;
46
};
47
51
struct
mps_cluster
{
55
long
int
n
;
56
60
mps_root
*
first
;
61
66
pthread_mutex_t
lock
;
67
};
68
72
struct
mps_cluster_item
{
76
mps_cluster
*
cluster
;
77
82
mps_cluster_item
*
next
;
83
88
mps_cluster_item
*
prev
;
89
94
mps_cluster_item
*
detached
;
95
};
96
100
struct
mps_clusterization
{
104
long
int
n
;
105
109
mps_cluster_item
*
first
;
110
};
111
112
/*********************************************************************************
113
* FUNCTIONS *
114
*********************************************************************************/
115
116
void
mps_cluster_reset (
mps_context
* s);
117
void
mps_fcluster (
mps_context
* s,
double
* frad,
int
nf);
118
void
mps_dcluster (
mps_context
* s, rdpe_t * drad,
int
nf);
119
void
mps_mcluster (
mps_context
* s, rdpe_t * drad,
int
nf);
120
void
mps_debug_cluster_structure (
mps_context
* s);
121
void
mps_cluster_analysis (
mps_context
* ctx,
mps_polynomial
* p);
122
123
/* Functions for mps_cluster */
124
mps_cluster
* mps_cluster_empty (
mps_context
* s);
125
mps_cluster
* mps_cluster_with_root (
mps_context
* s,
long
int
root_index);
126
void
mps_cluster_free (
mps_context
* s,
mps_cluster
* cluster);
127
mps_root
* mps_cluster_insert_root (
mps_context
* s,
mps_cluster
* cluster,
long
int
root_index);
128
void
mps_cluster_remove_root (
mps_context
* s,
mps_cluster
* cluster,
mps_root
* root);
129
mps_cluster
* mps_cluster_join (
mps_context
* s,
mps_cluster
* cluster_a,
mps_cluster
* cluster_b);
130
131
/* Functions for mps_clusterization */
132
mps_clusterization
* mps_clusterization_empty (
mps_context
* s);
133
mps_cluster_item
* mps_clusterization_insert_cluster (
mps_context
* s,
mps_clusterization
* c,
mps_cluster
* cluster);
134
void
mps_clusterization_pop_cluster (
mps_context
* s,
mps_clusterization
* c,
mps_cluster_item
* cluster_item);
135
void
mps_clusterization_remove_cluster (
mps_context
* s,
mps_clusterization
* c,
mps_cluster_item
* cluster_item);
136
void
mps_clusterization_free (
mps_context
* s,
mps_clusterization
* c);
137
void
mps_clusterization_detach_clusters (
mps_context
* s,
mps_clusterization
* c);
138
void
mps_clusterization_reassemble_clusters (
mps_context
* s,
mps_clusterization
* c);
139
140
void
mps_cluster_detach (
mps_context
* s,
mps_cluster
* cluster);
141
142
MPS_END_DECLS
143
144
#endif
/* endif MPS_CLUSTER_H_ */
mps.h
Header file for libmps.
mps_cluster_item
Cluster held in a mps_clusterization.
Definition
cluster.h:72
mps_cluster_item::detached
mps_cluster_item * detached
This pointer to the cluster from which the cluster were detached, if any. Otherwise it is set to NULL...
Definition
cluster.h:94
mps_cluster_item::next
mps_cluster_item * next
Next cluster in the clusterization, or NULL if there is no such cluster.
Definition
cluster.h:82
mps_cluster_item::cluster
mps_cluster * cluster
Pointer to the actual cluster.
Definition
cluster.h:76
mps_cluster_item::prev
mps_cluster_item * prev
Previous cluster in the clusterizaion or NULL if there is no such cluster.
Definition
cluster.h:88
mps_cluster
A cluster of mps_roots.
Definition
cluster.h:51
mps_cluster::first
mps_root * first
Pointer to the first root in the cluster.
Definition
cluster.h:60
mps_cluster::n
long int n
Number of roots in the cluster.
Definition
cluster.h:55
mps_cluster::lock
pthread_mutex_t lock
Internal mutex used to perform operations in a thread-safe way.
Definition
cluster.h:66
mps_clusterization
A list of mps_cluster.
Definition
cluster.h:100
mps_clusterization::first
mps_cluster_item * first
Pointer to the first cluster in the clusterization.
Definition
cluster.h:109
mps_clusterization::n
long int n
Number of cluster in the clusterization.
Definition
cluster.h:104
mps_context
this struct holds the state of the mps computation
Definition
context.h:60
mps_polynomial
Struct that represents an abstract polynomial. All the other real polynomial implementations (such as...
Definition
polynomial.h:111
mps_root
This struct represent a root inside of a mps_cluster.
Definition
cluster.h:30
mps_root::prev
mps_root * prev
Pointer to the previous root, or NULL if there is no previous root.
Definition
cluster.h:45
mps_root::next
mps_root * next
Next root, or NULL if this is the last root of the cluster.
Definition
cluster.h:39
mps_root::k
long int k
Index of the root that is considered.
Definition
cluster.h:34
include
mps
private
cluster.h
Generated on
for MPSolve by
1.18.0