votca 2024-dev
Loading...
Searching...
No Matches
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
28namespace votca {
29namespace tools {
30
35class Correlate {
36 public:
37 Correlate() = default;
38 ~Correlate() = default;
39
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
53inline 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
class to calculate correlations of values
Definition correlate.h:35
std::vector< double > corr_
Definition correlate.h:50
const std::vector< double > & getData() const
Definition correlate.h:47
std::vector< double > & getData()
Definition correlate.h:46
void CalcCorrelations(DataCollection< double >::selection &data)
Definition correlate.cc:24
std::ostream & operator<<(std::ostream &out, const Correlate &c)
Definition correlate.h:53
base class for all analysis tools
Definition basebead.h:33