MURE
Loading...
Searching...
No Matches
MiscFunction.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef _MISCFUNCTION_HXX_
20#define _MISCFUNCTION_HXX_
21
27#include <iostream>
28#include <sstream>
29#include <vector>
30#include <string>
31
32using namespace std;
33
34double PS(vector < double > U, vector < double > V);
35
37
43void RotateVector(vector < double > &V, double phi, double theta = 0, double psi = 0);
45
52void RotatePoint(double *P, double phi, double theta = 0, double psi = 0, double *center = nullptr);
53
55
62void RotatePoint(vector < double > &P, double phi, double theta = 0, double psi = 0, double *center = nullptr);
63
64
65
67
81void Regression(int N, const vector < double > &x, const vector < double > &y, const vector < double > &y_sdev,
82 double &A, double &B, double &A_sdev, double &B_sdev, double &chi2);
83
85
96void FindFitParameters(int N, const vector < double > &x, const vector < double > &y, const vector < double > &y_sdev,
97 double &A, double &B);
98
99
101string __macro_method_name__ (string x);
102
104
108string wordwrap (string x, int w);
109
110double CylVol(double Radius, double Height);
111
112double OnionRingVol(double Radius_a, double Radius_i, double Height);
113double OnionRingVol(double Radius_a, double Radius_i, double Height_a, double Height_i);
114
115#endif
string __macro_method_name__(string x)
this is for METHOD_NAME macro, extracting method name from PRETTY_FUNCTION
Definition MiscFunction.cxx:154
double CylVol(double Radius, double Height)
Definition MiscFunction.cxx:281
void FindFitParameters(int N, const vector< double > &x, const vector< double > &y, const vector< double > &y_sdev, double &A, double &B)
Find Slope and Intersept of fit.
Definition MiscFunction.cxx:239
void RotateVector(vector< double > &V, double phi, double theta=0, double psi=0)
Rotate a Vector clockwise. ??? why a shape member?
Definition MiscFunction.cxx:35
void RotatePoint(double *P, double phi, double theta=0, double psi=0, double *center=nullptr)
Rotate a Point clockwise.??? why a shape member?
Definition MiscFunction.cxx:68
double PS(vector< double > U, vector< double > V)
Scalar product of 3D vectors U and V.
Definition MiscFunction.cxx:110
void Regression(int N, const vector< double > &x, const vector< double > &y, const vector< double > &y_sdev, double &A, double &B, double &A_sdev, double &B_sdev, double &chi2)
Linear Regression function.
Definition MiscFunction.cxx:170
double OnionRingVol(double Radius_a, double Radius_i, double Height)
Definition MiscFunction.cxx:288
string wordwrap(string x, int w)
word-wrap a string
Definition MiscFunction.cxx:122
the namespace of the Standard C++

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024