FEI Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
snl_fei_RaggedTable_specialize.hpp
Go to the documentation of this file.
1#ifndef _snl_fei_RaggedTable_specialize_hpp_
2#define _snl_fei_RaggedTable_specialize_hpp_
3
4/*--------------------------------------------------------------------*/
5/* Copyright 2005 Sandia Corporation. */
6/* Under the terms of Contract DE-AC04-94AL85000, there is a */
7/* non-exclusive license for use of this work by or on behalf */
8/* of the U.S. Government. Export of this program may require */
9/* a license from the United States Government. */
10/*--------------------------------------------------------------------*/
11
12#include <fei_macros.hpp>
14#include <fei_ctg_set.hpp>
15#include <snl_fei_MapContig.hpp>
16
17namespace snl_fei {
18
20template<>
21class RaggedTable<MapContig<fei::ctg_set<int>*>,fei::ctg_set<int> >
22 : public fei::IndexTable {
23public:
24 RaggedTable(int firstKey, int lastKey);
25
27
30 typedef map_type::iterator iterator;
31
32 virtual ~RaggedTable()
33 {
34 iterator it = begin();
35 iterator it_end = end();
36 for(; it!=it_end; ++it) {
37 poolAllocatorSet_.destroy( (*it).second );
38 poolAllocatorSet_.deallocate( (*it).second, 1 );
39 }
40 }
41
42 void addDiagonals(int numIndices,
43 const int* indices);
44
45 void addIndices(int row,
46 int numIndices,
47 const int* indices);
48
49 void addIndices(int numRows,
50 const int* rows,
51 int numIndices,
52 const int* indices);
53
54 map_type& getMap() { return( map_ ); }
55
56 row_type* getRow(int row)
57 {
58 iterator m_end = map_.end();
59 iterator m_iter = map_.find(row);
60 return( m_end == m_iter ? NULL : (*m_iter).second );
61 }
62
63 iterator begin() { return( map_.begin() ); }
64
65 iterator end() { return( map_.end() ); }
66
67 private:
71};//RaggedTable<MapContig<fei::ctg_set<int>*> >
72
73}//namespace snl_fei
74#endif
75
void deallocate(pointer p, size_type n)
void destroy(U *p)
fei_Pool_alloc< SET_TYPE > poolAllocatorSet_
void addIndices(int row, int numIndices, const int *indices)
void addDiagonals(int numIndices, const int *indices)