libjbt

jbt_brackets Class Reference

A collection of brackets. More...

#include <brackets.h>

List of all members.

Public Members


Detailed Description

A collection of brackets.

Author(s):
Mark Tigges

This class represents a collection of brackets of zeroes of the one dimensional function f(t) which represents f(x,y,z) along a line defined by o+td. In other words, the elements of this list are the contiguous maximum and minimum field values for a BlobTree along a ray.


Member Function Documentation

jbt_brackets::jbt_brackets()

Constructs a new collection of brackets. The collection is initially empty.

void jbt_brackets::add( jFlt a, jFlt b )

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.

void jbt_brackets::add( const jRay& ray, jbt_blobtree* bt, jFlt a, jFlt b )

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.

void jbt_brackets::add( const jRay& ray, jbt_blobtree* bt, jFlt a, jFlt b, jFlt c )

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

void jbt_brackets::flatten()

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.

void jbt_brackets::bracket( int, jFlt&, jFlt& ) const

Returns the ith bracket in the collection. No range checking is performed. The result is undefined unless flatten has been called.

int jbt_brackets::count() const

Returns the number of items in the collection. The value is undefined unless flatten has been called.

void jbt_brackets::plotdata( jbt_blobtree*, const jRay&, ostream& )

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.


The documentation for this class was generated from the following file:
JSP / libjbt v0.1 mtigges@cpsc.ucalgary.ca