JDFTx  1.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
complex Struct Reference

Complex number (need to define our own because we need operators for gpu code as well) More...

#include <scalar.h>

Public Member Functions

__hostanddev__ double & real ()
 
__hostanddev__ double & imag ()
 
__hostanddev__ const double & real () const
 
__hostanddev__ const double & imag () const
 
__hostanddev__ complex (double x=0, double y=0)
 
__hostanddev__ complexoperator+= (const complex &c)
 
__hostanddev__ complexoperator+= (double r)
 
__hostanddev__ complex operator+ (const complex &c) const
 
__hostanddev__ complex operator+ (double r) const
 
__hostanddev__ complexoperator-= (const complex &c)
 
__hostanddev__ complexoperator-= (double r)
 
__hostanddev__ complex operator- (const complex &c) const
 
__hostanddev__ complex operator- (double r) const
 
__hostanddev__ complex operator- () const
 
__hostanddev__ complexoperator*= (const complex &c)
 
__hostanddev__ complexoperator*= (double r)
 
__hostanddev__ complex operator* (const complex &c) const
 
__hostanddev__ complex operator* (double r) const
 
__hostanddev__ complexoperator/= (const complex &c)
 
__hostanddev__ complexoperator/= (double r)
 
__hostanddev__ complex operator/ (const complex &c) const
 
__hostanddev__ complex operator/ (double r) const
 
__hostanddev__ double norm () const
 
__hostanddev__ double abs () const
 
__hostanddev__ double arg () const
 
__hostanddev__ complex conj () const
 

Public Attributes

double x
 
double y
 

Detailed Description

Complex number (need to define our own because we need operators for gpu code as well)


The documentation for this struct was generated from the following file: