run.directed.sampling function

Run the directed sampling algorithm