A collection of brackets. More...
#include <brackets.h>
Constructs a new collection of brackets. The collection is initially empty.
Adds a bracket to the collection.
\params a A maximum of the function. \params b A minimum of the function.
Use this addition only if you know that a and b bracket a root of the implicit equation.
Adds 2 brackets to the collection.
\params ray The line passing through the BlobTree \params bt The BlobTree whose field is bracketed \params a The distance to the beginning of the field of the BlobTree \params b The distance to the end of the field of the BlobTree
Use this function if it is difficult to bracket the function or or you are unsure of where the minimum might be.
Adds 2 brackets to the collection.
\params ray The line passing through the BlobTree \params bt The BlobTree whose field is bracketed \params a The distance to the beginning of the field of the BlobTree \params b Some approximation of the minimum between a and b \params c The distance to the end of the field of the BlobTree
Flattens the collection into an array. Any calls to add are ignored after a call to flatten. Any calls to bracket(int) are ignored before a call to flatten. Flatten will also sort the brackets on the low of bracket.
Returns the ith bracket in the collection. No range checking is performed. The result is undefined unless flatten has been called.
Returns the number of items in the collection. The value is undefined unless flatten has been called.
Writes out plot data to the given ostream. This function samples the function at many samples and outputs the samples points. Output is undefined if flatten has not been called.