Awali
Another Weighted Automata library
Public Types | Public Member Functions | Static Public Member Functions
awali::sttc::c Class Reference

The semiring of complex numbers. More...

#include <c.hh>

Public Types

using self_type = c
 
using value_t = std::complex< double >
 

Public Member Functions

std::ostream & print_set (std::ostream &o, const std::string &format="text") const
 
value_t star (const value_t v) const
 
template<unsigned version = version::fsm_json>
json::node_tto_json () const
 
template<unsigned version = version::fsm_json>
value_t value_from_json (json::node_t const *p) const
 
template<unsigned version = version::fsm_json>
json::node_tvalue_to_json (value_t v) const
 
std::string vname (bool=true) const
 

Static Public Member Functions

static value_t abs (const value_t v)
 
static value_t add (const value_t l, const value_t r)
 
static value_t conv (b, b::value_t v)
 
static value_t conv (n, n::value_t v)
 
static value_t conv (q, q::value_t v)
 
static value_t conv (r, r::value_t v)
 
static value_t conv (self_type, value_t v)
 
static value_t conv (std::istream &i)
 
static value_t conv (z, z::value_t v)
 
static bool equals (const value_t l, const value_t r)
 
static double greedy (std::istream &i)
 
static size_t hash (value_t v)
 
static constexpr bool is_commutative_semiring ()
 
static bool is_one (const value_t v)
 
static bool is_special (const value_t)
 
static bool is_zero (const value_t v)
 
static value_t ldiv (const value_t l, const value_t r)
 
static bool less_than (value_t lhs, value_t rhs)
 Whether lhs < rhs. More...
 
static c make (std::istream &is)
 Build from the description in is. More...
 
static value_t mul (const value_t l, const value_t r)
 
static value_t one ()
 
static value_t parse (const std::string &s, size_t &p)
 
static std::ostream & print (const value_t v, std::ostream &o, const std::string &format="text")
 
static value_t rdiv (const value_t l, const value_t r)
 
static constexpr bool show_one ()
 
static std::string sname ()
 
static constexpr star_status_t star_status ()
 
static value_t sub (const value_t l, const value_t r)
 
static value_t transpose (const value_t v)
 
static value_t zero ()
 

Detailed Description

The semiring of complex numbers.

The values are impleted by std::complex<double>

Member Typedef Documentation

◆ self_type

◆ value_t

using awali::sttc::c::value_t = std::complex<double>

Member Function Documentation

◆ abs()

static value_t awali::sttc::c::abs ( const value_t  v)
static

◆ add()

static value_t awali::sttc::c::add ( const value_t  l,
const value_t  r 
)
static

◆ conv() [1/7]

static value_t awali::sttc::c::conv ( b  ,
b::value_t  v 
)
static

◆ conv() [2/7]

static value_t awali::sttc::c::conv ( n  ,
n::value_t  v 
)
static

◆ conv() [3/7]

static value_t awali::sttc::c::conv ( q  ,
q::value_t  v 
)
static

◆ conv() [4/7]

static value_t awali::sttc::c::conv ( r  ,
r::value_t  v 
)
static

◆ conv() [5/7]

static value_t awali::sttc::c::conv ( self_type  ,
value_t  v 
)
static

◆ conv() [6/7]

static value_t awali::sttc::c::conv ( std::istream &  i)
static

◆ conv() [7/7]

static value_t awali::sttc::c::conv ( z  ,
z::value_t  v 
)
static

◆ equals()

static bool awali::sttc::c::equals ( const value_t  l,
const value_t  r 
)
static

◆ greedy()

static double awali::sttc::c::greedy ( std::istream &  i)
static

◆ hash()

static size_t awali::sttc::c::hash ( value_t  v)
static

◆ is_commutative_semiring()

static constexpr bool awali::sttc::c::is_commutative_semiring ( )
staticconstexpr

◆ is_one()

static bool awali::sttc::c::is_one ( const value_t  v)
static

◆ is_special()

static bool awali::sttc::c::is_special ( const  value_t)
static

◆ is_zero()

static bool awali::sttc::c::is_zero ( const value_t  v)
static

◆ ldiv()

static value_t awali::sttc::c::ldiv ( const value_t  l,
const value_t  r 
)
static

◆ less_than()

static bool awali::sttc::c::less_than ( value_t  lhs,
value_t  rhs 
)
static

Whether lhs < rhs.

◆ make()

static c awali::sttc::c::make ( std::istream &  is)
static

Build from the description in is.

◆ mul()

static value_t awali::sttc::c::mul ( const value_t  l,
const value_t  r 
)
static

◆ one()

static value_t awali::sttc::c::one ( )
static

◆ parse()

static value_t awali::sttc::c::parse ( const std::string &  s,
size_t &  p 
)
static

◆ print()

static std::ostream& awali::sttc::c::print ( const value_t  v,
std::ostream &  o,
const std::string &  format = "text" 
)
static

◆ print_set()

std::ostream& awali::sttc::c::print_set ( std::ostream &  o,
const std::string &  format = "text" 
) const

◆ rdiv()

static value_t awali::sttc::c::rdiv ( const value_t  l,
const value_t  r 
)
static

◆ show_one()

static constexpr bool awali::sttc::c::show_one ( )
staticconstexpr

◆ sname()

static std::string awali::sttc::c::sname ( )
static

◆ star()

value_t awali::sttc::c::star ( const value_t  v) const

◆ star_status()

static constexpr star_status_t awali::sttc::c::star_status ( )
staticconstexpr

◆ sub()

static value_t awali::sttc::c::sub ( const value_t  l,
const value_t  r 
)
static

◆ to_json()

template<unsigned version = version::fsm_json>
json::node_t* awali::sttc::c::to_json ( ) const

◆ transpose()

static value_t awali::sttc::c::transpose ( const value_t  v)
static

◆ value_from_json()

template<unsigned version = version::fsm_json>
value_t awali::sttc::c::value_from_json ( json::node_t const *  p) const

◆ value_to_json()

template<unsigned version = version::fsm_json>
json::node_t* awali::sttc::c::value_to_json ( value_t  v) const

◆ vname()

std::string awali::sttc::c::vname ( bool  = true) const

◆ zero()

static value_t awali::sttc::c::zero ( )
static

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