H
Hicham Mouline
Hello,
I have functions that each take 1 parameter. This parameter is of type
struct S {
<arithmetic_or_bool_type_1> member_name_1;
<arithmetic_or_bool_type_n> member_name_n;
}; // n can be of order 10 or so
class C {
public:
return_type apply( const S& ) const;
};
Now I want to optimize the returned value.
I would optimize by fixing any subset of the n members fixed, ie none at
all, or just member 5, or members 4 and 8, or members 7,3 and n, or n-1
members of the {1....n} set.
How can I do this?
maybe
class C{
public:
pair<return_type, S> optimize(...) const; // returns the optimum S
that gives the best return value
};
Some interface like this looks nice to me (as a user).
The question is how to pass the fixed members to optimize.
regards,
I have functions that each take 1 parameter. This parameter is of type
struct S {
<arithmetic_or_bool_type_1> member_name_1;
<arithmetic_or_bool_type_n> member_name_n;
}; // n can be of order 10 or so
class C {
public:
return_type apply( const S& ) const;
};
Now I want to optimize the returned value.
I would optimize by fixing any subset of the n members fixed, ie none at
all, or just member 5, or members 4 and 8, or members 7,3 and n, or n-1
members of the {1....n} set.
How can I do this?
maybe
class C{
public:
pair<return_type, S> optimize(...) const; // returns the optimum S
that gives the best return value
};
Some interface like this looks nice to me (as a user).
The question is how to pass the fixed members to optimize.
regards,