/usr/include/relion-1.3/src/complex.h is in librelion-dev-common 1.3+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | /***************************************************************************
*
* Author: "Sjors H.W. Scheres"
* MRC Laboratory of Molecular Biology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This complete copyright notice must be included in any revised version of the
* source code. Additional authorship citations may be added, but existing
* author citations must be preserved.
***************************************************************************/
#ifndef COMPLEX_H_
#define COMPLEX_H_
#include <iostream>
#include <cmath>
class Complex
{
public:
double real;
double imag;
// Constructor
Complex(double _r = 0.0, double _i = 0.0);
Complex operator+(Complex &op);
void operator+=(Complex &op);
Complex operator-(Complex &op);
void operator-=(Complex &op);
Complex operator*(Complex &op);
void operator*=(double op);
Complex operator*(double op);
Complex operator/(Complex &op);
Complex operator/(double op);
void operator/=(double op);
// Complex conjugated
Complex conj();
// Abs value: sqrt(real*real+imag*imag)
double abs();
// Norm value: real*real+imag*imag
double norm();
// Phase angle: atan2(imag,real)
double arg();
};
Complex conj(const Complex& op);
double abs(const Complex& op);
double norm(const Complex& op);
double arg(const Complex& op);
Complex operator+(const Complex& lhs, const Complex& rhs);
Complex operator-(const Complex& lhs, const Complex& rhs);
Complex operator*(const Complex& lhs, const Complex& rhs);
Complex operator*(const Complex& lhs, const double& val);
Complex operator*(const double& val, const Complex& rhs);
Complex operator/(const Complex& lhs, const double& val);
void operator+=(Complex& lhs, const Complex& rhs);
void operator-=(Complex& lhs, const Complex& rhs);
#endif
|