class SelectEndSegment : public feasst::SelectSegment

Select an end segment. Set the anchor as the other end of the selection from the end point.

Subclassed by feasst::SelectReptate

Public Functions

void precompute(System *system)

Precompute quantities before simulation for optimization.

bool random_end_segment_in_particle(const Configuration &config, const int max_length, Select *select, Random *random, bool *is_endpoint_beginning)

Select all sites between a random endpoint and a randomly selectioned site in a randomly selected particle in group. Return true if the endpoint is at the beginning.

param is_endpoint_beginning:

Set the maximum length of the segment. If -1 (default), consider all possible lengths.

bool select(const Select &perturbed, System *system, Random *random)

Perform the selection as implemented in the derived class. Return false if the selection cannot be made. Otherwise, return true.

param perturbed:

Perturbed is included to allow chaining of selection based on previous.