SheafSystem  0.0.0.0
ij_adjacency_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 IJ_ADJACENCY_INDEX_SPACE_INTERVAL_H
22 #define IJ_ADJACENCY_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 ij_adjacency_implicit_index_space_iterator;
46 
52 {
53 
54  friend class fiber_bundles_namespace;
55  friend SHEAF_DLL_SPEC size_t deep_size(const ij_adjacency_index_space_interval& xn, bool xinclude_shallow);
56 
57  // ===========================================================
59  // ===========================================================
61 
62 public:
63 
71  static const ij_adjacency_index_space_interval& new_space(index_space_family& xid_spaces,
72  size_type xub,
73  pod_type xzone_hub_begin,
74  size_type xi_size,
75  size_type xj_size);
76 
77 protected:
78 
79 private:
80 
82 
83 
84  // ===========================================================
86  // ===========================================================
88 
89 public:
90 
95 
99  pod_type zone_hub_begin() const;
100 
104  pod_type zone_hub_begin(pod_type xlocal_id) const;
105 
110  void adjacent_zones(pod_type xlocal_id,
111  pod_type& xzone_hub_begin,
112  size_type& xi_ct,
113  size_type& xj_ct) const;
114 
118  size_type i_size() const;
119 
123  size_type j_size() const;
124 
128  size_type i_vertex_size() const;
129 
133  size_type j_vertex_size() const;
134 
135 protected:
136 
141 
146 
150  pod_type _zone_hub_begin;
151 
156 
161 
166 
171 
172 private:
173 
175 
176 
177  // ===========================================================
179  // ===========================================================
181 
182 public:
183 
184 protected:
185 
186 private:
187 
189 
190 
191  // ===========================================================
193  // ===========================================================
195 
196 public:
197 
201  virtual const std::string& class_name() const;
202 
206  virtual ij_adjacency_index_space_interval* clone() const;
207 
208 protected:
209 
210 private:
211 
215  static bool make_prototype();
216 
218 
219 
220  // ===========================================================
222  // ===========================================================
224 
225 public:
226 
230  virtual bool operator==(const index_space_collection& xother) const;
231 
235  virtual size_type deep_size(bool xinclude_shallow) const;
236 
237 protected:
238 
242  virtual ij_adjacency_index_space_interval& operator=(const index_space_collection& xother);
243 
248  virtual explicit_index_space_state* explicit_state(pod_type xlocal_id) const;
249 
250 private:
251 
253 
254 
255  // ===========================================================
257  // ===========================================================
259 
260 public:
261 
265  virtual void remove(pod_type xlocal_id);
266 
270  virtual size_type ct(pod_type xlocal_id) const;
271 
273 
277  virtual pod_type begin(pod_type xlocal_id) const;
278 
280 
284  virtual pod_type end(pod_type xlocal_id) const;
285 
286 
288 
292  virtual bool contains(pod_type xlocal_id, pod_type xid) const;
293 
298  virtual bool contains_unglued_hub(pod_type xlocal_id, pod_type xid) const;
299 
304  virtual bool contains(pod_type xlocal_id, pod_type xid, pod_type xhub_id) const;
305 
310  virtual pod_type pod(pod_type xlocal_id, pod_type xid) const;
311 
316  virtual pod_type unglued_hub_pod(pod_type xlocal_id, pod_type xid) const;
317 
321  virtual bool is_persistent(pod_type xlocal_id) const;
322 
323 protected:
324 
325 private:
326 
328 
329 
330  // ===========================================================
332  // ===========================================================
334 
335 public:
336 
341  virtual void new_product_structure(pod_type xlocal_id,
342  const abstract_product_structure& xproduct);
343 
347  virtual void delete_product_structure(pod_type xlocal_id);
348 
352  virtual const abstract_product_structure& product_structure(pod_type xlocal_id) const;
353 
357  virtual abstract_product_structure& product_structure(pod_type xlocal_id);
358 
362  virtual bool has_product_structure(pod_type xlocal_id) const;
363 
364 protected:
365 
366 private:
367 
369 
370 
371  // ===========================================================
373  // ===========================================================
375 
376 public:
377 
382  virtual index_space_handle& get_id_space(pod_type xlocal_id) const;
383 
387  virtual void release_id_space(index_space_handle& xid_space) const;
388 
393  virtual bool allocated_id_space(const index_space_handle& xid_space) const;
394 
395 protected:
396 
401 
402 private:
403 
405 
406 
407  // ===========================================================
409  // ===========================================================
411 
412 public:
413 
418  virtual index_space_iterator& get_id_space_iterator(pod_type xlocal_id) const;
419 
423  virtual void release_id_space_iterator(index_space_iterator& xitr) const;
424 
429  virtual bool allocated_id_space_iterator(const index_space_iterator& xitr) const;
430 
431 protected:
432 
437 
438 private:
439 
441 
442 
443  // ===========================================================
445  // ===========================================================
447 
448 public:
449 
453  virtual bool is_ancestor_of(const any *other) const;
454 
458  virtual bool invariant() const;
459 
460 protected:
461 
462 private:
463 
465 
466 };
467 
468 // ===========================================================
469 // NON-MEMBER FUNCTIONS
470 // ===========================================================
471 
475 SHEAF_DLL_SPEC
476 size_t deep_size(const ij_adjacency_index_space_interval& xn, bool xinclude_shallow = true);
477 
478 } // end namespace fiber_bundle
479 
480 #endif // ifndef IJ_ADJACENCY_INDEX_SPACE_INTERVAL_H
ij_adjacency_index_space_interval(const ij_adjacency_index_space_interval &xother)
Copy constructor; disabled.
An abstract class that defines the product structure for an id space.
An abstract iterator over the ids of an id space.
An implementation of index_space_interval for an interval of implicit id spaces for the adjacency of ...
size_type _i_size
The number of zones in the i direction.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
SHEAF_DLL_SPEC size_t deep_size(const ij_adjacency_index_space_interval &xn, bool xinclude_shallow=true)
The deep size of ij_adjacency_index_space_interval& xn.
size_type _i_vertex_size
The number of vertices in the i direction.
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.
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()...
An immutable abstract state for a space of alternate integer identifiers (aliases) for a subset of th...
size_type _j_vertex_size
The number of vertices in the j direction.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
list_pool< forwarding_index_space_handle > _handles
The handle pool.
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.
list_pool< ij_adjacency_implicit_index_space_iterator > _iterators
The iterator pool.
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.
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.
size_type _j_size
The number of zones in the j direction.
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