votca
2024.2-dev
Loading...
Searching...
No Matches
tools
include
votca
tools
correlate.h
Go to the documentation of this file.
1
/*
2
* Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org)
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
*/
17
18
#ifndef VOTCA_TOOLS_CORRELATE_H
19
#define VOTCA_TOOLS_CORRELATE_H
20
21
// Standard includes
22
#include <iostream>
23
#include <vector>
24
25
// Local VOTCA includes
26
#include "
datacollection.h
"
27
28
namespace
votca
{
29
namespace
tools {
30
35
class
Correlate
{
36
public
:
37
Correlate
() =
default
;
38
~Correlate
() =
default
;
39
44
void
CalcCorrelations
(
DataCollection<double>::selection
&data);
45
46
std::vector<double> &
getData
() {
return
corr_
; }
47
const
std::vector<double> &
getData
()
const
{
return
corr_
; }
48
49
private
:
50
std::vector<double>
corr_
;
51
};
52
53
inline
std::ostream &
operator<<
(std::ostream &out,
const
Correlate
&c) {
54
for
(
double
i : c.
getData
()) {
55
out << i << std::endl;
56
}
57
return
out;
58
}
59
60
}
// namespace tools
61
}
// namespace votca
62
63
#endif
// VOTCA_TOOLS_CORRELATE_H
votca::tools::Correlate
class to calculate correlations of values
Definition
correlate.h:35
votca::tools::Correlate::corr_
std::vector< double > corr_
Definition
correlate.h:50
votca::tools::Correlate::getData
const std::vector< double > & getData() const
Definition
correlate.h:47
votca::tools::Correlate::Correlate
Correlate()=default
votca::tools::Correlate::getData
std::vector< double > & getData()
Definition
correlate.h:46
votca::tools::Correlate::CalcCorrelations
void CalcCorrelations(DataCollection< double >::selection &data)
Definition
correlate.cc:24
votca::tools::Correlate::~Correlate
~Correlate()=default
votca::tools::DataCollection::selection
class for array selection
Definition
datacollection.h:63
datacollection.h
votca::tools::operator<<
std::ostream & operator<<(std::ostream &out, const Correlate &c)
Definition
correlate.h:53
votca
base class for all analysis tools
Definition
basebead.h:33
Generated by
1.12.0