/usr/include/relion-1.4/src/complex.h is in librelion-dev-common 1.4+dfsg-1build1.
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 85 | /***************************************************************************
*
* 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>
#include "src/macros.h"
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
|