NEST main@caf0ae8
 
Loading...
Searching...
No Matches
modelrange.h
Go to the documentation of this file.
1/*
2 * modelrange.h
3 *
4 * This file is part of NEST.
5 *
6 * Copyright (C) 2004 The NEST Initiative
7 *
8 * NEST is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * NEST is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#ifndef MODELRANGE_H
24#define MODELRANGE_H
25
26// Includes from nestkernel:
27#include "nest_types.h"
28
29namespace nest
30{
31
33{
34public:
35 modelrange( size_t model, size_t first_node_id, size_t last_node_id );
36 bool
37 is_in_range( size_t node_id ) const
38 {
39 return ( node_id >= first_node_id_ and node_id <= last_node_id_ );
40 }
41 size_t
43 {
44 return model_;
45 }
46 size_t
48 {
49 return first_node_id_;
50 }
51 size_t
53 {
54 return last_node_id_;
55 }
56 void extend_range( size_t new_last_node_id );
57
58private:
59 size_t model_;
62};
63}
64
65#endif
Definition modelrange.h:33
size_t first_node_id_
Definition modelrange.h:60
size_t get_model_id() const
Definition modelrange.h:42
size_t model_
Definition modelrange.h:59
bool is_in_range(size_t node_id) const
Definition modelrange.h:37
size_t get_last_node_id() const
Definition modelrange.h:52
size_t get_first_node_id() const
Definition modelrange.h:47
size_t last_node_id_
Definition modelrange.h:61
void extend_range(size_t new_last_node_id)
Definition modelrange.cpp:36
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33