1 /*
2  *  conn_builder_conngen.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 CONN_BUILDER_CONNGEN_H
24 #define CONN_BUILDER_CONNGEN_H
25 
26 #include "config.h"
27 #ifdef HAVE_LIBNEUROSIM
28 
29 // C++ includes:
30 #include <map>
31 #include <vector>
32 
33 // Includes from nestkernel:
34 #include "conn_builder.h"
35 #include "nest_datums.h"
36 
37 namespace nest
38 {
39 
40 class ConnectionGeneratorBuilder : public ConnBuilder
41 {
42   typedef std::vector< ConnectionGenerator::ClosedInterval > RangeSet;
43   typedef ConnectionGenerator::ClosedInterval Range;
44 
45 public:
46   ConnectionGeneratorBuilder( NodeCollectionPTR,
47     NodeCollectionPTR,
48     const DictionaryDatum&,
49     const std::vector< DictionaryDatum >& );
50 
51 protected:
52   void connect_();
53   void cg_set_masks();
54   index cg_get_right_border( index left, size_t step, const NodeCollectionPTR nodes );
55   void cg_get_ranges( RangeSet& ranges, const NodeCollectionPTR nodes );
56 
57 private:
58   ConnectionGeneratorDatum cg_;
59   DictionaryDatum params_map_;
60 };
61 
62 } // namespace nest
63 
64 #endif /* ifdef HAVE_LIBNEUROSIM */
65 
66 #endif /* ifdef CONN_BUILDER_CONNGEN_H */
67