Tannic
A C++ Tensor Library
Loading...
Searching...
No Matches
complex.hpp File Reference

Complex number operations for the Tannic Tensor Library. More...

#include "concepts.hpp"
#include "types.hpp"
#include "shape.hpp"
#include "strides.hpp"
#include "traits.hpp"
#include <cassert>
Include dependency graph for complex.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tannic::expression::Cartesian
 Tag type for Cartesian (real/imaginary) complex number representation. More...
 
struct  tannic::expression::Polar
 Tag type for Polar (magnitude/angle) complex number representation. More...
 
class  tannic::expression::Complexification< Coordinates, Source >
 
class  tannic::expression::Complexification< Coordinates, Real, Imaginary >
 
class  tannic::expression::Realification< Source >
 Creates a real-valued view of complex tensor data. More...
 

Namespaces

namespace  tannic
 
namespace  tannic::expression
 

Functions

template<Expression Real>
constexpr auto tannic::expression::complexify (Real &&real)
 Creates a complex tensor view from interleaved real/imaginary data.
 
template<Expression Real, Expression Imaginary>
constexpr auto tannic::expression::complex (Real &&real, Imaginary &&imaginary)
 Creates complex tensor from separate real and imaginary tensors

 
template<Expression Magnitude, Expression Angle>
constexpr auto tannic::expression::polar (Magnitude &&rho, Angle &&theta)
 Creates complex tensor from polar coordinates (magnitude/angle)
 
template<Expression Complex>
constexpr auto tannic::expression::realify (Complex &&complex)
 Creates a real-valued view of complex tensor data.
 

Detailed Description

Complex number operations for the Tannic Tensor Library.

Author
Eric Hermosis
Date
2025

This header provides functionality for working with complex numbers as tensors, including:

  • Complex number creation with cartesian and polar coordinates.
  • Real views from complex tensors.

The functions here described provide the way to complexify real tensors or view complex tensors in real space.