MOOSE - Multiscale Object Oriented Simulation Environment
Main Page
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
SynEvent.h
Go to the documentation of this file.
1
/**********************************************************************
2
** This program is part of 'MOOSE', the
3
** Messaging Object Oriented Simulation Environment.
4
** Copyright (C) 2013 Upinder S. Bhalla. and NCBS
5
** It is made available under the terms of the
6
** GNU Lesser General Public License version 2.1
7
** See the file COPYING.LIB for the full notice.
8
**********************************************************************/
9
10
#ifndef _SYN_EVENT_H
11
#define _SYN_EVENT_H
12
13
class
SynEvent
14
{
15
public
:
16
SynEvent
()
17
:
time
( 0.0 ),
weight
( 0.0 )
18
{;}
19
20
SynEvent
(
double
t,
double
w )
21
:
time
( t ),
weight
( w )
22
{;}
23
24
double
time
;
25
double
weight
;
26
};
27
28
struct
CompareSynEvent
29
{
30
bool
operator()
(
const
SynEvent
& lhs,
const
SynEvent
& rhs)
const
31
{
32
// Note that this is backwards. We want the smallest timestamp
33
// on the top of the events priority_queue.
34
return
lhs.
time
> rhs.
time
;
35
}
36
};
37
38
class
PreSynEvent
:
public
SynEvent
39
{
40
public
:
41
PreSynEvent
()
42
:
SynEvent
(),
// call the parent constructor with default args
43
// by default calls without args, so no need really
44
synIndex
( 0 )
45
{}
46
47
PreSynEvent
(
unsigned
int
i,
double
t,
double
w )
48
:
SynEvent
(t,w),
// call the parent constructor with given args
49
synIndex
( i )
50
{;}
51
52
unsigned
int
synIndex
;
53
};
54
55
class
PostSynEvent
56
{
57
public
:
58
PostSynEvent
()
59
:
time
( 0.0 )
60
{;}
61
62
PostSynEvent
(
double
t )
63
:
time
( t )
64
{;}
65
66
double
time
;
67
};
68
69
struct
ComparePostSynEvent
70
{
71
bool
operator()
(
const
PostSynEvent
& lhs,
const
PostSynEvent
& rhs)
const
72
{
73
// Note that this is backwards. We want the smallest timestamp
74
// on the top of the events priority_queue.
75
return
lhs.
time
> rhs.
time
;
76
}
77
};
78
79
#endif // _SYN_EVENT_H
PreSynEvent::PreSynEvent
PreSynEvent(unsigned int i, double t, double w)
Definition:
SynEvent.h:47
SynEvent
Definition:
SynEvent.h:13
PostSynEvent
Definition:
SynEvent.h:55
PostSynEvent::time
double time
Definition:
SynEvent.h:66
SynEvent::SynEvent
SynEvent(double t, double w)
Definition:
SynEvent.h:20
PreSynEvent::PreSynEvent
PreSynEvent()
Definition:
SynEvent.h:41
ComparePostSynEvent
Definition:
SynEvent.h:69
SynEvent::weight
double weight
Definition:
SynEvent.h:25
PostSynEvent::PostSynEvent
PostSynEvent(double t)
Definition:
SynEvent.h:62
ComparePostSynEvent::operator()
bool operator()(const PostSynEvent &lhs, const PostSynEvent &rhs) const
Definition:
SynEvent.h:71
PreSynEvent
Definition:
SynEvent.h:38
CompareSynEvent
Definition:
SynEvent.h:28
CompareSynEvent::operator()
bool operator()(const SynEvent &lhs, const SynEvent &rhs) const
Definition:
SynEvent.h:30
PreSynEvent::synIndex
unsigned int synIndex
Definition:
SynEvent.h:52
PostSynEvent::PostSynEvent
PostSynEvent()
Definition:
SynEvent.h:58
SynEvent::time
double time
Definition:
SynEvent.h:24
SynEvent::SynEvent
SynEvent()
Definition:
SynEvent.h:16
moose-core
synapse
SynEvent.h
Generated on Tue Sep 4 2018 09:05:33 for MOOSE - Multiscale Object Oriented Simulation Environment by
1.8.6