Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Generator
src
Physics
Coherent
XSection
ARWavefunction.cxx
Go to the documentation of this file.
1
//____________________________________________________________________________
2
/*
3
Copyright (c) 2003-2020, The GENIE Collaboration
4
For the full text of the license visit http://copyright.genie-mc.org
5
6
Daniel Scully ( d.i.scully \at warwick.ac.uk)
7
University of Warwick
8
*/
9
//____________________________________________________________________________
10
11
#include <iostream>
12
#include <sstream>
13
#include <string>
14
#include <complex>
15
#include <vector>
16
17
#include "
Physics/Coherent/XSection/ARWavefunction.h
"
18
19
namespace
genie
20
{
21
namespace
alvarezruso
22
{
23
24
ARWavefunction::ARWavefunction
(
unsigned
int
sampling_in,
bool
debug
)
25
: debug_(debug),
26
sampling_(2*sampling_in),
27
wavefunction_(sampling_,
std
::
vector
<
std
::complex<double> >(sampling_,
std
::complex<double> (0.0,0.0)) )
28
{
29
if
(
debug_
) std::cerr <<
"WF@ Constructor"
<<
std::endl
;
30
}
31
32
ARWavefunction::~ARWavefunction
() {}
33
34
std::string
ARWavefunction::print
()
const
35
{
36
std::ostringstream oss;
37
oss <<
"{"
;
38
for
(
unsigned
int
i = 0; i !=
sampling_
; ++i)
39
{
40
oss <<
"["
;
41
for
(
unsigned
int
j = 0; j !=
sampling_
; ++j)
42
{
43
oss << ((*this)[i][j]);
44
if
( j != (
sampling_
- 1) ) oss <<
", "
;
45
}
46
oss <<
"]"
;
47
}
48
oss <<
"}"
;
49
return
oss.str();
50
}
51
52
const
std::vector<std::complex<double> >&
ARWavefunction::operator[]
(
unsigned
int
i)
const
53
{
54
return
wavefunction_
[i];
55
}
56
57
const
std::complex<double> &
ARWavefunction::operator()
(
unsigned
int
i,
unsigned
int
j)
const
58
{
59
return
wavefunction_
[i][j];
60
}
61
62
std::complex<double>
ARWavefunction::get
(
unsigned
int
i,
unsigned
int
j)
const
63
{
64
return
wavefunction_
[i][j];
65
}
66
67
void
ARWavefunction::set
(
unsigned
int
i,
unsigned
int
j,
const
std::complex<double> &
value
)
68
{
69
wavefunction_
[i][j] =
value
;
70
}
71
72
unsigned
int
ARWavefunction::sampling
()
const
{
return
sampling_
; }
73
74
}
//namespace alvarezruso
75
}
//namespace genie
vector
Definition:
lodepng.cpp:52
genie
THE MAIN GENIE PROJECT NAMESPACE
Definition:
AlgCmp.h:25
string
std::string string
Definition:
nybbler.cc:12
genie::alvarezruso::ARWavefunction::operator()
const std::complex< double > & operator()(unsigned int i, unsigned int j) const
Definition:
ARWavefunction.cxx:57
genie::alvarezruso::ARWavefunction::sampling
unsigned int sampling() const
Definition:
ARWavefunction.cxx:72
std
STL namespace.
genie::alvarezruso::ARWavefunction::wavefunction_
std::vector< std::vector< std::complex< double > > > wavefunction_
Definition:
ARWavefunction.h:54
ARWavefunction.h
genie::alvarezruso::ARWavefunction::get
std::complex< double > get(unsigned int i, unsigned int j) const
Definition:
ARWavefunction.cxx:62
genie::alvarezruso::ARWavefunction::operator[]
const std::vector< std::complex< double > > & operator[](unsigned int i) const
Definition:
ARWavefunction.cxx:52
genie::alvarezruso::ARWavefunction::sampling_
unsigned int sampling_
Definition:
ARWavefunction.h:53
genie::alvarezruso::ARWavefunction::debug_
bool debug_
Definition:
ARWavefunction.h:52
python.larbatch_posix.debug
string debug
Definition:
larbatch_posix.py:142
genie::alvarezruso::ARWavefunction::~ARWavefunction
~ARWavefunction()
Definition:
ARWavefunction.cxx:32
alvarezruso
genie::alvarezruso::ARWavefunction::set
void set(unsigned int i, unsigned int j, const std::complex< double > &value)
Definition:
ARWavefunction.cxx:67
genie::alvarezruso::ARWavefunction::ARWavefunction
ARWavefunction(unsigned int sampling_in, bool debug=false)
Definition:
ARWavefunction.cxx:24
genie::alvarezruso::ARWavefunction::print
std::string print() const
Definition:
ARWavefunction.cxx:34
submit_mcc.value
value
Definition:
submit_mcc.py:159
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
Generated by
1.8.11