MCPcopy Create free account
hub / github.com/algorithm-archivists/algorithm-archive / choose

Function choose

contents/IFS/code/cpp/IFS.cpp:35–37  ·  view source on GitHub ↗

Return a random point from the non-empty PointVector

Source from the content-addressed store, hash-verified

33
34// Return a random point from the non-empty PointVector
35Point choose(const PointVector& points) {
36 return points[randrange(points.size())];
37}
38
39// This is a function to simulate a "chaos game"
40PointVector chaosGame(int numOutputPoints, const PointVector& inputPoints) {

Callers 1

chaosGameFunction · 0.85

Calls 2

randrangeFunction · 0.85
sizeMethod · 0.65

Tested by

no test coverage detected