Click here to Skip to main content
15,911,141 members

Comments by RowanArkison (Top 5 by date)

RowanArkison 17-Sep-12 2:43am View    
Convert in this case means, I have a c source code and I am stuck writing a C# implementation doing the same work as the function in C - so conversion is more a manual step :-D
RowanArkison 17-Sep-12 2:41am View    
Hi Sergey!

If I understand you right, this small sniplet just checks the object against zero. So this be a suitable representation in C#, right?

public enum objects
{
None,
TypeA,
[...]
}

if (objects[matrix[i][j]] == objects.None)
{
}

Regards Rowan
RowanArkison 27-Apr-11 0:52am View    
Math.NET is a nice framework. But that is the point why I do not want to use it: it is overpowered for my case and I do not learn very much from using foreign code. So I'll try to set up my own version of reducing the termns with expression trees. I altered my code to build a tree with expressions (not that hard as I thought) and now try to figure out how to reduce the terms.

First idea:

- Find all patterns that can easyly be reduced (2x + 3x for instance)
- search the tree for stand alone "denominators" -> so the right leaf must be present in every leaf on the left side (or the other way round) to reduce the fraction
- ...
RowanArkison 26-Apr-11 12:46pm View    
Jap, I try. Thanks!
RowanArkison 26-Apr-11 12:46pm View    
Indeed, it is not (spent the whole weekend thinking about it and trying around with fractions). I could maybe accept the performance issue since I can use parallelism to solve the expression and I do not expect very compley ones / more than 100k computations of a formula at once.
If I break down the example, I definitly need only exactly the case mentioned above - just remove x from the equation. I try a bit around with the CAS / Expression tree topic, never used the lambda stuff before. But thanks a lot for now :-)