FEI
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
base
snl_fei_RaggedTable_specialize.hpp
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>
13
#include <snl_fei_RaggedTable.hpp>
14
#include <fei_ctg_set.hpp>
15
#include <snl_fei_MapContig.hpp>
16
17
namespace
snl_fei {
18
20
template
<>
21
class
RaggedTable
<
MapContig
<
fei
::ctg_set<int>*>,
fei::ctg_set
<int> >
22
:
public
fei::IndexTable
{
23
public
:
24
RaggedTable
(
int
firstKey,
int
lastKey);
25
26
RaggedTable
(
const
RaggedTable
<
MapContig
<
fei::ctg_set<int>
*>,
fei::ctg_set<int>
>& src);
27
28
typedef
MapContig<fei::ctg_set<int>
*> map_type;
29
typedef
fei::ctg_set<int>
row_type;
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
:
68
map_type map_;
69
fei_Pool_alloc<row_type>
poolAllocatorSet_;
70
row_type dummy;
71
};
//RaggedTable<MapContig<fei::ctg_set<int>*> >
72
73
}
//namespace snl_fei
74
#endif
75
fei::IndexTable
Definition
fei_IndexTable.hpp:19
fei::ctg_set
Definition
fei_ctg_set.hpp:39
fei_Pool_alloc
Definition
fei_Pool_alloc.hpp:34
snl_fei::MapContig
Definition
snl_fei_MapContig.hpp:19
snl_fei::RaggedTable< MapContig< fei::ctg_set< int > * >, fei::ctg_set< int > >::RaggedTable
RaggedTable(int firstKey, int lastKey)
Definition
snl_fei_RaggedTable_specialize.cpp:15
snl_fei::RaggedTable::getRow
SET_TYPE * getRow(int row)
Definition
snl_fei_RaggedTable.hpp:196
snl_fei::RaggedTable::begin
iterator begin()
Definition
snl_fei_RaggedTable.hpp:205
snl_fei::RaggedTable::RaggedTable
RaggedTable(int firstKey, int lastKey)
Definition
snl_fei_RaggedTable.hpp:90
snl_fei::RaggedTable::addIndices
void addIndices(int row, int numIndices, const int *indices)
Definition
snl_fei_RaggedTable.hpp:117
snl_fei::RaggedTable::getMap
MAP_TYPE & getMap()
Definition
snl_fei_RaggedTable.hpp:183
snl_fei::RaggedTable::end
iterator end()
Definition
snl_fei_RaggedTable.hpp:212
snl_fei::RaggedTable::addDiagonals
void addDiagonals(int numIndices, const int *indices)
Definition
snl_fei_RaggedTable.hpp:218
fei
Definition
fei_ArrayUtils.hpp:16
Generated by
1.17.0