Bluebit Software
Bluebit Software Support Forum
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



Bluebit::MatrixLibrary::Complex to... Expand / Collapse
Message
Posted Sunday, May 11, 2008 2:43 PM Post #477
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Hello

I am using complex number Matrix and would like to check the values on it. How could I do it with standart
std::complex complex number to use with Console::WriteLine();
and what I must add to my project to be allowed

CMatrix ^A = gcnew CMatrix(50, 50);
std::complex ans (real(A->Determinant()), 0);
Posted Sunday, May 11, 2008 4:15 PM Post #478
 

Bluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit Support
.NET Matrix Library defines the Bluebit::MatrixLibrary::Complex structure in order to handle complex numbers.

Please test the following code:

int main(array<System::String ^> ^args)
{

 CMatrix^ A= gcnew CMatrix(4, 4);
 A->FillRandom();

 //Print all matrix elements
 Console::WriteLine(A);

 //Print top left element
 Console::WriteLine("This is top left element {0}", A[0,0].ToString() );

 Complex c = A->Determinant();

 Console::WriteLine("The determinant is equal to {0}", c.ToString());

 Console::ReadLine();
    return 0;
}



Trifon Triantafillidis

Lead Developer

Bluebit Software

Posted Monday, May 12, 2008 12:10 PM Post #479
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Thank you wery much for your answer It was wery helpful
In Class CMatrix I have only round to ones values when I use FillRandom(2.5.2.7), but I need double precision values. How could I do this ?
Posted Monday, May 12, 2008 12:24 PM Post #480
 

Bluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit Support
You can use the 3rd parameter of the FillRandom method which specifies the rounding of the random values.

Trifon Triantafillidis

Lead Developer

Bluebit Software

« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Trifon

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 12:01pm

Powered by InstantForum.NET v4.1.4 © 2010
Execution: 0.172. 6 queries. Compression Disabled.
.NET Matrix Library