NEST  2.6.0,not_revisioned_source_dir@0
selector.h
Go to the documentation of this file.
1 /*
2  * selector.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 SELECTOR_H
24 #define SELECTOR_H
25 
26 #include "nest.h"
27 #include "dictdatum.h"
28 
29 namespace nest
30 {
31 
36  struct Selector {
41  Selector(): model(-1), depth(-1)
42  {}
49  Selector(const DictionaryDatum &d);
53  bool select_model() const
54  { return model>=0; }
58  bool select_depth() const
59  { return depth>=0; }
64  bool operator==(const Selector & other)
65  { return (other.model==model) and (other.depth==depth); }
74  };
75 
76 } // namespace nest
77 
78 #endif
Definition: lockptrdatum.h:40
const Name d("d")
Specific to Izhikevich 2003.
Definition: nest_names.h:83
Contains rules for selecting nodes from a layer when connecting.
Definition: selector.h:36
Selector()
The default constructor creates a Selector with no specific rules, so all nodes are selected...
Definition: selector.h:41
bool select_depth() const
Definition: selector.h:58
const Name other("other")
Node type.
Definition: nest_names.h:216
long_t model
The model to select, or -1 if all models are allowed.
Definition: selector.h:69
bool operator==(const Selector &other)
Test if two selectors are equal, i.e.
Definition: selector.h:64
long_t depth
The depth to select, or -1 if all depths are allowed.
Definition: selector.h:73
Default types used by the NEST kernel.
bool select_model() const
Definition: selector.h:53
long long_t
Integer number with at least 32 bit.
Definition: nest.h:96