update_idx_slice()
- Back in inspect_quota():
$state->update_total_iters(); if ($self->total_boards_solved() == $self->num_boards()) { $self->status("solved_all"); } else { $state->update_idx_slice(); } sub update_idx_slice { my $state = shift; my $r = $state->idx_slice()->copy(); # $r cannot be 0, because the ones that were 0, were already solved # in $state->update_total_iters(). $state->idx_slice() .= (($r > 0) * ($r - $state->quota())) + (($r < 0) * ($r )); }
- .= is in-place assignment to a tensor's elements in PDL.