And how would this affect the genetic algorithm? The genetic algorithm should not respond to values if it is purely genetic. If some additional averaging or gradient descent is used, it may affect it. But in this case it is better to solve the problem in a direct way - to filter the parameter through the array and shuffle the array. The value of the optimized parameter from the properties window is an index of the array element, and the value from the array will be used in the Expert Advisor itself. Then the optimizer can be tricked. But only if convergence occurs due to averaging or gradient descent. But if it is a pure genetic algorithm, I can't imagine what good it will do. What's the point? Where do the legs grow from?
class A
{
private:
constint _a;
public:
A(constint a): _a(a) { Print(_a); }
};
//+------------------------------------------------------------------+class B
{
private:
const A a;
public:
B(constint b): a(b) {}
};
//+------------------------------------------------------------------+voidOnStart()
{
B b(3);// 3
}
//+------------------------------------------------------------------+
everything is OK, but I need an array of A objects, i.e. I need it like this:
class B
{
private:
const A a[2];public:
B(constint b): a[0](b),a[1](b) {} //'[' - member(s) initialization expected// 'a' - explicit initializer for arrays not allowed
};
is there any way to call a constructor for an array of objects without using pointers?
the code is minimalistic, it works - i want an array of structures, lists are not always convenient, everything works, it is clear that non-standard situations using this code can be simulated, but the code a dozen lines
the GA is more of a "buzz word" thing. How can Gray's code help convergence? Just theoretically...
you might as well just randomly shuffle
i'm not saying anything, i don't believe everything written on the internet for a long time, i try to check everything
here's a working conversion code to Gray's code and back
there is this code:
everything is OK, but I need an array of A objects, i.e. I need it like this:
is there any way to call a constructor for an array of objects without using pointers?
there is this code:
everything is OK, but I need an array of A objects, i.e. I need it like this:
is there any way to call a constructor for an array of objects without using pointers?
Is it possible for this code:
for LIST to make a template / template ?
It didn't work the first time (((.
Is it possible for this code:
for LIST to make a template / template ?
it did not work the first time ((.
this. remove
UPD: hmm... you've got it all figured out))))
UPD: get the yum))))
this. remove
UPD: hmmm... you've got it all figured out))))
UPD: catch the yum-yum)))
Thanks! - it works!
the code is minimalistic, it works - i want an array of structures, lists are not always convenient, everything works, it is clear that non-standard situations using this code can be simulated, but the code a dozen lines
why this code does not give a compiler error when accessing someone else's private field:
this is its own private field
OK, thanks!
But if a derived class in a parent class changes private fields in the same way, is it "legal" ?
i.e. in a similar way: