SheafSystem  0.0.0.0
ijk_connectivity_index_space_interval.h
Go to the documentation of this file.
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
20 
21 #ifndef IJK_CONNECTIVITY_INDEX_SPACE_INTERVAL_H
22 #define IJK_CONNECTIVITY_INDEX_SPACE_INTERVAL_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef FORWARDING_INDEX_SPACE_HANDLE_H
29 #include "SheafSystem/forwarding_index_space_handle.h"
30 #endif
31 
32 #ifndef INDEX_SPACE_INTERVAL_H
33 #include "SheafSystem/index_space_interval.h"
34 #endif
35 
36 #ifndef LIST_POOL_H
37 #include "SheafSystem/list_pool.h"
38 #endif
39 
40 namespace fiber_bundle
41 {
42 
43 using namespace sheaf;
44 
45 class ijk_connectivity_implicit_index_space_iterator;
46 
52 {
53 
54  friend class fiber_bundles_namespace;
55  friend SHEAF_DLL_SPEC size_t deep_size(const ijk_connectivity_index_space_interval& xn, bool xinclude_shallow);
56 
57  // ===========================================================
59  // ===========================================================
61 
62 public:
63 
71  static const ijk_connectivity_index_space_interval& new_space(index_space_family& xid_spaces,
72  size_type xub,
73  pod_type xvertex_hub_begin,
74  size_type xj_size,
75  size_type xk_size);
76 
77 protected:
78 
79 private:
80 
82 
83 
84  // ===========================================================
86  // ===========================================================
88 
89 public:
90 
95 
99  pod_type vertex_hub_begin() const;
100 
104  pod_type vertex_hub_begin(pod_type xlocal_id) const;
105 
109  size_type j_size() const;
110 
114  size_type k_size() const;
115 
119  size_type j_vertex_size() const;
120 
124  size_type k_vertex_size() const;
125 
129  size_type jk_vertex_size() const;
130 
131 protected:
132 
137 
142 
146  pod_type _vertex_hub_begin;
147 
152 
157 
162 
167 
172 
173 private:
174 
176 
177 
178  // ===========================================================
180  // ===========================================================
182 
183 public:
184 
185 protected:
186 
187 private:
188 
190 
191 
192  // ===========================================================
194  // ===========================================================
196 
197 public:
198 
202  virtual const std::string& class_name() const;
203 
207  virtual ijk_connectivity_index_space_interval* clone() const;
208 
209 protected:
210 
211 private:
212 
216  static bool make_prototype();
217 
219 
220 
221  // ===========================================================
223  // ===========================================================
225 
226 public:
227 
231  virtual bool operator==(const index_space_collection& xother) const;
232 
236  virtual size_type deep_size(bool xinclude_shallow) const;
237 
238 protected:
239 
243  virtual ijk_connectivity_index_space_interval& operator=(const index_space_collection& xother);
244 
249  virtual explicit_index_space_state* explicit_state(pod_type xlocal_id) const;
250 
251 private:
252 
254 
255 
256  // ===========================================================
258  // ===========================================================
260 
261 public:
262 
266  virtual void remove(pod_type xlocal_id);
267 
271  virtual size_type ct(pod_type xlocal_id) const;
272 
274 
278  virtual pod_type begin(pod_type xlocal_id) const;
279 
281 
285  virtual pod_type end(pod_type xlocal_id) const;
286 
287 
289 
293  virtual bool contains(pod_type xlocal_id, pod_type xid) const;
294 
299  virtual bool contains_unglued_hub(pod_type xlocal_id, pod_type xid) const;
300 
305  virtual bool contains(pod_type xlocal_id, pod_type xid, pod_type xhub_id) const;
306 
311  virtual pod_type pod(pod_type xlocal_id, pod_type xid) const;
312 
317  virtual pod_type unglued_hub_pod(pod_type xlocal_id, pod_type xid) const;
318 
322  virtual bool is_persistent(pod_type xlocal_id) const;
323 
324 protected:
325 
326 private:
327 
329 
330 
331  // ===========================================================
333  // ===========================================================
335 
336 public:
337 
342  virtual void new_product_structure(pod_type xlocal_id,
343  const abstract_product_structure& xproduct);
344 
348  virtual void delete_product_structure(pod_type xlocal_id);
349 
353  virtual const abstract_product_structure& product_structure(pod_type xlocal_id) const;
354 
358  virtual abstract_product_structure& product_structure(pod_type xlocal_id);
359 
363  virtual bool has_product_structure(pod_type xlocal_id) const;
364 
365 protected:
366 
367 private:
368 
370 
371 
372  // ===========================================================
374  // ===========================================================
376 
377 public:
378 
383  virtual index_space_handle& get_id_space(pod_type xlocal_id) const;
384 
388  virtual void release_id_space(index_space_handle& xid_space) const;
389 
394  virtual bool allocated_id_space(const index_space_handle& xid_space) const;
395 
396 protected:
397 
402 
403 private:
404 
406 
407 
408  // ===========================================================
410  // ===========================================================
412 
413 public:
414 
419  virtual index_space_iterator& get_id_space_iterator(pod_type xlocal_id) const;
420 
424  virtual void release_id_space_iterator(index_space_iterator& xitr) const;
425 
430  virtual bool allocated_id_space_iterator(const index_space_iterator& xitr) const;
431 
432 protected:
433 
438 
439 private:
440 
442 
443 
444  // ===========================================================
446  // ===========================================================
448 
449 public:
450 
454  virtual bool is_ancestor_of(const any *other) const;
455 
459  virtual bool invariant() const;
460 
461 protected:
462 
463 private:
464 
466 
467 };
468 
469 // ===========================================================
470 // NON-MEMBER FUNCTIONS
471 // ===========================================================
472 
476 SHEAF_DLL_SPEC
477 size_t deep_size(const ijk_connectivity_index_space_interval& xn, bool xinclude_shallow = true);
478 
479 } // end namespace fiber_bundle
480 
481 #endif // ifndef IJK_CONNECTIVITY_INDEX_SPACE_INTERVAL_H
list_pool< forwarding_index_space_handle > _handles
The handle pool.
An abstract class that defines the product structure for an id space.
An abstract iterator over the ids of an id space.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
pod_index_type pod_type
The "plain old data" index type for this.
An implementation of index_space_interval for an interval of implicit id spaces for the connectivity ...
Abstract base class with useful features for all objects.
Definition: any.h:39
An implemenation of index_space_collection that adds an interface for the interval [begin()...
size_type _k_vertex_size
The number of vertices in the k direction.
An immutable abstract state for a space of alternate integer identifiers (aliases) for a subset of th...
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
size_type _j_vertex_size
The number of vertices in the j direction.
list_pool< ijk_connectivity_implicit_index_space_iterator > _iterators
The iterator pool.
ijk_connectivity_index_space_interval(const ijk_connectivity_index_space_interval &xother)
Copy constructor; disabled.
A collection of id space states. This is a virtual class with provides an interface for accessing the...
bool operator==(const singly_linked_list< T, Alloc > &lhs, const singly_linked_list< T, Alloc > &rhs)
Checks if the contents of lhs and rhs are equal, that is, whether lhs.size() == rhs.size() and each element in lhs compares equal with the element in rhs at the same position.
size_type _k_size
The number of zones in the k direction.
SHEAF_DLL_SPEC size_t deep_size(const ijk_connectivity_index_space_interval &xn, bool xinclude_shallow=true)
The deep size of ijk_connectivity_index_space_interval& xn.
size_type _jk_vertex_size
The number of vertices in the j*k direction.
Namespace for the sheaves component of the sheaf system.
pod_type end() const
Ending space id of this interval in the id space family scope.
virtual bool contains(pod_type xlocal_id) const
True if this collection contains the id space with local id xlocal_id.
Factory and container for a family of id spaces.
size_type _j_size
The number of zones in the j direction.
Namespace for the fiber_bundles component of the sheaf system.
pod_type begin() const
Beginning space id of this interval in the id space family scope.
A reallocated pool of objects of type T. Objects in the pool are either allocated or stored in a free...
Definition: list_pool.h:42