We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c63a282 commit 052958dCopy full SHA for 052958d
fortran/solver/src/guess.f90
@@ -23,6 +23,7 @@ module guess_mod
23
contains
24
procedure :: init => guess_init
25
procedure :: eval
26
+ procedure :: next
27
procedure :: set_solution
28
end type guess_t
29
public :: guess_t
@@ -147,6 +148,11 @@ subroutine eval(guess)
147
148
guess%mask = library%get_mask()
149
guess%max_length = max_length
150
end subroutine eval
151
+ subroutine next(guess)
152
+ use random_mod, only: shuffle
153
+ class(guess_t), intent(inout) :: guess
154
+ call shuffle(guess%guess, size(guess%guess), guess%mask)
155
+ end subroutine next
156
subroutine set_solution(guess, library)
157
class(guess_t), intent(in) :: guess
158
type(library_t), target, intent(inout) :: library
0 commit comments