Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » [DISCUSSION] Add 'complex' datatype, to Value too
Re: [DISCUSSION] Add 'complex' datatype, to Value too [message #32918 is a reply to message #32838] Mon, 20 June 2011 09:36 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
Quote:


I know it is possible in most cases... But the wrapper has more pros that I forgot to mention. E.g. it is a clean way to "move" complex to Upp namespace... I am too lazy person to type "using std::complex;" every time I want to use it (And hardcoding the using clause into U++ doesn't feel right...)


this is again a base principles decision. why not thinking of complex as 'just another logical type like int or double'. this would relief the namespace boundaries..

i'm not quite familiar with the std::complex implementation, which states to be optimized (through template specialization) for double, int and float..

but as mirek said, i dont mind to use std::complex at all.

again, to make std::complex usable in Value, we'd need to have those (or some related) changes in SetNull behaviour or extend Nuller (which probably is a lot esier.

as of fft: doubtlessly fftw is the fastest implementation and the most versatile. but the api sucks definitely. so it'd be a must to have it as plugin to be able to expose it's c api as C++, thus avoiding LGPL issues. ofcorse static linkage isnt possible then.

EDIT: in case std::complex<>: to write complex<double> each time is cumbersome. a \typedef complex<double> cdouble' and respectively for the others would be good..
typedef

EDIT: no need to derive from complex to pull it into upp namespace. just place the 'typedef std::complex<double> cdouble' in the upp namespace..cdouble is then Upp::cdouble. just tested it.

[Updated on: Mon, 20 June 2011 10:46]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bugs in Tuple, RemoveSorted and in Scribble Example
Next Topic: PLATFORM_X11 warnings
Goto Forum:
  


Current Time: Tue Apr 29 15:11:26 CEST 2025

Total time taken to generate the page: 0.03990 seconds