codac  1.5.7
codac_ConnectedSubset.h
Go to the documentation of this file.
1 
12 #ifndef __CODAC_CONNECTEDSUBSET_H__
13 #define __CODAC_CONNECTEDSUBSET_H__
14 
15 #include <functional>
16 #include "codac_IntervalMatrix.h"
17 #include "codac_Vector.h"
18 #include "codac_Set.h"
19 
20 namespace codac
21 {
22  class Paving;
23 
34  class ConnectedSubset : public Set
35  {
36  public:
37 
40 
46  ConnectedSubset(const std::vector<const Paving*>& v_subset_items);
47 
52 
59 
66  bool contains(const Vector& p) const;
67 
73  const Paving* get_paving() const;
74 
80  const std::vector<const Paving*>& get_items() const; // items of type k
81 
87  std::vector<IntervalVector> get_boxes() const; // items of type k
88 
99  std::vector<IntervalVector> get_boundary(SetValue value_boundary = SetValue::UNKNOWN, SetValue value_out = SetValue::OUT) const; // items of type k-1
100 
107  static const std::vector<IntervalVector> get_boxed_hulls(const std::vector<ConnectedSubset> v_subsets);
108 
112 
130  bool zero_proven(const std::function<IntervalVector(const IntervalVector&)>& f);
131 
153  int zeros_number(const std::function<IntervalVector(const IntervalVector&)>& f, const std::function<IntervalMatrix(const IntervalVector&)>& Jf, float precision);
154 
156 
157  protected:
158 
161 
168  int topological_degree(const std::function<IntervalVector(const IntervalVector&)>& f);
169 
176  bool all_positive_signs(const std::vector<int>& v_s) const;
177 
186  int orientation(const IntervalVector& b, const IntervalVector& parent_coface, int orientation) const;
187 
196  int compute_local_degree(const std::function<IntervalVector(const IntervalVector&)>& f, const IntervalVector& b, const IntervalVector& common_cocoface) const;
197 
206  std::vector<int> sign_vector(const std::function<IntervalVector(const IntervalVector&)>& f, const IntervalVector& b, const IntervalVector& common_cocoface) const;
207 
214  std::vector<IntervalVector> get_cofaces(const IntervalVector& b) const;
215 
223  std::vector<IntervalVector> get_cofaces(const IntervalVector& b, const IntervalVector& common_cocoface) const;
224 
231  int box_dimension(const IntervalVector& b) const;
232 
240  bool non_singular_jacobian(const std::function<IntervalMatrix(const IntervalVector&)>& Jf, float precision);
241 
243 
244  protected:
245 
246  std::vector<const Paving*> m_v_subset_items;
247  };
248 }
249 
250 #endif
Multi-dimensional paving representation of a connected subset.
Definition: codac_ConnectedSubset.h:35
int box_dimension(const IntervalVector &b) const
Returns the dimension of the box .
ConnectedSubset(const std::vector< const Paving * > &v_subset_items)
Creates a connected subset.
std::vector< const Paving * > m_v_subset_items
set of leaves items
Definition: codac_ConnectedSubset.h:246
int zeros_number(const std::function< IntervalVector(const IntervalVector &)> &f, const std::function< IntervalMatrix(const IntervalVector &)> &Jf, float precision)
Counts the number of zeros of an uncertain function enclosed by on this subset.
std::vector< IntervalVector > get_boxes() const
Returns the set of Paving boxes this subset is made of.
bool zero_proven(const std::function< IntervalVector(const IntervalVector &)> &f)
Tests if an unknown function enclosed by vanishes at least once on this subset.
static const std::vector< IntervalVector > get_boxed_hulls(const std::vector< ConnectedSubset > v_subsets)
Returns the boxed hull of each connected subset into a vector of boxes.
bool non_singular_jacobian(const std::function< IntervalMatrix(const IntervalVector &)> &Jf, float precision)
Tests whether the Jacobian is non-singular or not.
~ConnectedSubset()
ConnectedSubset destructor.
const std::vector< const Paving * > & get_items() const
Returns the set of Paving leaves this subset is made of.
std::vector< int > sign_vector(const std::function< IntervalVector(const IntervalVector &)> &f, const IntervalVector &b, const IntervalVector &common_cocoface) const
Returns a vector of signs represented as integers.
bool contains(const Vector &p) const
Tests if p is contained in the connected subset.
int orientation(const IntervalVector &b, const IntervalVector &parent_coface, int orientation) const
Returns orientation of vector b.
std::vector< IntervalVector > get_cofaces(const IntervalVector &b) const
Returns a vector of cofaces related to .
int topological_degree(const std::function< IntervalVector(const IntervalVector &)> &f)
Computes the topological degree related to .
bool is_strictly_included_in_paving() const
Tests if this subset is strictly included in its paving structure.
std::vector< IntervalVector > get_boundary(SetValue value_boundary=SetValue::UNKNOWN, SetValue value_out=SetValue::OUT) const
Returns the boundary boxes of this subset.
bool all_positive_signs(const std::vector< int > &v_s) const
Returns true if all items in v_s are positive.
std::vector< IntervalVector > get_cofaces(const IntervalVector &b, const IntervalVector &common_cocoface) const
Returns a vector of cofaces related to , common_cocoface.
int compute_local_degree(const std::function< IntervalVector(const IntervalVector &)> &f, const IntervalVector &b, const IntervalVector &common_cocoface) const
Computes local degree related to .
const Paving * get_paving() const
Returns a const pointer to the paving structure.
Multi-dimensional paving as representation of a set.
Definition: codac_Paving.h:30
Multi-dimensional interval-based representation of a set.
Definition: codac_Set.h:67
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition: codac_capd_helpers.h:9
SetValue
Defines a set of feasible values of a set.
Definition: codac_Set.h:27
@ UNKNOWN
unable to conclude
@ OUT
outside the solution set