Scopira  20080306
complex.h
1 
2 /*
3  * Copyright (c) 2004 National Research Council
4  *
5  * All rights reserved.
6  *
7  * This material is confidential and proprietary information of
8  * National Research Council Canada ("Confidential Information").
9  * This Confidential Information may only be used and reproduced
10  * in accordance with the terms of the license agreement.
11  *
12  */
13 
14 #ifndef __INCLUDED_SCOPIRA_BASEKIT_COMPLEX_H__
15 #define __INCLUDED_SCOPIRA_BASEKIT_COMPLEX_H__
16 
17 #include <scopira/basekit/narray.h>
18 
19 template <class T, class ELE>
21  const std::complex<ELE> &el)
22 {
23  return o << '(' << el.real() << ',' << el.imag() << ')';
24 }
25 
26 template <>
27  inline void scopira::basekit::print_element<std::complex<float> >(scopira::tool::oflow_i &o, std::complex<float> el)
28 {
29  flow_printf(o, " (%8.2f,%8.2f)", el.real(), el.imag());
30 }
31 
32 template <>
33  inline void scopira::basekit::print_element<std::complex<double> >(scopira::tool::oflow_i &o, std::complex<double> el)
34 {
35  flow_printf(o, " (%8.2f,%8.2f)", el.real(), el.imag());
36 }
37 
38 #endif
39 
void flow_printf(oflow_i &o, const char *fmt,...)
printf style
Definition: flow.h:159