Home » U++ Library support » U++ Core » [DISCUSSION] Add 'complex' datatype, to Value too
Re: [DISCUSSION] Add 'complex' datatype, to Value too [message #32935 is a reply to message #32930] |
Wed, 22 June 2011 13:12   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
here comes a patch file for including complex as an additional basic datatype. thats why i have placed it in Defs.h, though it's 'math' related, but the other data types are math as well, right 
it contains the integration of it in Value as far as possible. but due to it beeing a class/struct and having ctor and operator=, it is not possible to use =Null / from-Value-conversion semantics. or at least i havent succeeded to do so. see my ComplexTest.
quick view, maybe anyone has an idea how to make this possible anyway..or leave it as issue.
NOTE: for successfull usage of std::complex (cdouble) in RichValue, the SetNull template usage change is needed. see my thread
http://www.ultimatepp.org/forum/index.php?t=msg&goto=325 14&#msg_32514
attached is a complete patch for that.. (patch8)
//cdouble to value conversion test
Value v = RichToValue(y);
v = y;
//Value to cdouble conversion test
// x = v; //ambiguity in std::complex::operator=
x = v.operator cdouble(); //needs explicit call
#if flagMSC
//works for MSC, GCC has constructor amiguity
x = cdouble(v);
x = (cdouble)v;
#endif
// x = Null; //ambiguity in std::complex::operator=
x = Null.operator cdouble(); //needs explicit call
#if flagMSC
//works for MSC, GCC has constructor amiguity
x = cdouble(Null);
x = (cdouble)Null;
#endif
EDIT:
Topt.h:227
[Updated on: Wed, 22 June 2011 13:36] Report message to a moderator
|
|
|
 |
|
[DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: Tom1 on Sun, 12 June 2011 18:04
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: koldo on Mon, 13 June 2011 08:47
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: Tom1 on Mon, 13 June 2011 11:20
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: Tom1 on Mon, 13 June 2011 19:24
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Mon, 13 June 2011 20:12
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Tue, 14 June 2011 08:15
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Sat, 25 June 2011 19:48
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Sun, 26 June 2011 09:30
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Mon, 27 June 2011 18:04
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Tue, 28 June 2011 09:16
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Wed, 06 July 2011 13:17
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Wed, 06 July 2011 17:25
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Wed, 06 July 2011 19:02
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Wed, 06 July 2011 19:03
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Wed, 06 July 2011 19:31
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: unknown user on Wed, 06 July 2011 23:23
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: Zbych on Wed, 06 July 2011 22:19
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Thu, 07 July 2011 08:19
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Thu, 07 July 2011 17:40
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: mirek on Sat, 30 July 2011 10:11
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
|
 |
|
Re: [DISCUSSION] Add 'complex' datatype, to Value too
By: koldo on Mon, 01 August 2011 09:50
|
Goto Forum:
Current Time: Mon Jun 16 02:05:55 CEST 2025
Total time taken to generate the page: 0.04571 seconds
|