B
Brownie
Hello,
I know that my request is ugly, but I need tot do that.
I have a class :
**********************************
package Epoch;
use strict;
use PDL;
sub new {
my ($class) = @_;
my $self = {};
bless($self, $class);
$self->{SOL_L4_A} = Solution->new ();
$self->{SOL_L1_A} = Solution->new ();
return $self;
}
1;
***********************************
SOL_L4_A and SOL_L1_A are to objects of the same class, and the way to
define it is the same (just one parameter is changed in the main
algorithme)
so in the main i have :
[...]
dice_axis($epoch->{SOL_L1_A}->{XYZ},1,$k3-1) .= $solL1_temp[$k];
[...]
dice_axis($epoch->{SOL_L4_A}->{XYZ},1,$k3-1) .= $solL4_temp[$k];
I would like to do something like :
$SOLUTION = L1;
dice_axis($epoch->{SOL_$SOLUTION_A}->{XYZ},1,$k3-1) .= $sol
$SOLUTION_temp[$k];
$SOLUTION = L4;
dice_axis($epoch->{SOL_$SOLUTION_A}->{XYZ},1,$k3-1) .= $sol
$SOLUTION_temp[$k];
I my algorithm, it is not just two lines,
Ty for your attention,
See You
I know that my request is ugly, but I need tot do that.
I have a class :
**********************************
package Epoch;
use strict;
use PDL;
sub new {
my ($class) = @_;
my $self = {};
bless($self, $class);
$self->{SOL_L4_A} = Solution->new ();
$self->{SOL_L1_A} = Solution->new ();
return $self;
}
1;
***********************************
SOL_L4_A and SOL_L1_A are to objects of the same class, and the way to
define it is the same (just one parameter is changed in the main
algorithme)
so in the main i have :
[...]
dice_axis($epoch->{SOL_L1_A}->{XYZ},1,$k3-1) .= $solL1_temp[$k];
[...]
dice_axis($epoch->{SOL_L4_A}->{XYZ},1,$k3-1) .= $solL4_temp[$k];
I would like to do something like :
$SOLUTION = L1;
dice_axis($epoch->{SOL_$SOLUTION_A}->{XYZ},1,$k3-1) .= $sol
$SOLUTION_temp[$k];
$SOLUTION = L4;
dice_axis($epoch->{SOL_$SOLUTION_A}->{XYZ},1,$k3-1) .= $sol
$SOLUTION_temp[$k];
I my algorithm, it is not just two lines,
Ty for your attention,
See You