Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

NewtonClassify Class Reference

#include <NewtonClassify.h>

Inheritance diagram for NewtonClassify:

Inheritance graph
[legend]
Collaboration diagram for NewtonClassify:

Collaboration graph
[legend]
List of all members.

Detailed Description

The NewtonClassify class is a high-level class to classify critical points.

There are two main methods in this class: classify(gmVector3) and classify(PointList). The first form find the eigenvectors, eigenvalues, and "kind" of a single point. The second form finds the eigenvectors, eigenvalues and "kinds" of a list of points. Each method stores the results in internal members.

Definition at line 32 of file NewtonClassify.h.

Public Member Functions

Constructors
 NewtonClassify ()
 Default constructor.

 NewtonClassify (Implicit *)
 Constructs an object containing critical points for a given Implicit.

Setting/Getting the Surface
virtual void setSurface (Implicit *)
 Changes the surface to search.

virtual ImplicitgetSurface ()
 Returns the current surface being searched.

Classifying
void classify (PointList)
 Finds the eigen vectors/values for all critical points in PointList.

void classify (gmVector3)
 Finds the eigen vectors and eigen values of a given point.


Public Attributes

Members set by Classify(PointList)
std::vector< CPKindfKinds
 A list of the kind of each critical point in the fRoots list.

std::vector< gmMatrix3 > fVectors
 A list of the eigen vectors of each critical point in fRoots.

std::vector< gmVector3 > fValues
 A list of the eigen values of each critical point in fRoots.

Members set by Classify(gmVector3)
gmMatrix3 eigenVectors
 The resulting eigen vectors after a call to classify(gmVector3).

gmVector3 eigenValues
 The resulting eigen values after a call to classify(gmVector3).

CPKind criticalKind
 The resulting kind of root after a call to classify(gmVector3).

int differentEigenIndex
 The index of the eigen value/vector that has a different sign from the others, or -1 if all eigen values are the same sign.


Protected Attributes

Implicitsurface
 Classify critical points for this Implicit surface.


Private Member Functions

int countPosEigenValues ()
 Determine the number of positive roots and the differentEigenIndex.


Constructor & Destructor Documentation

NewtonClassify::NewtonClassify  ) 
 

Default constructor.

This method isn't very useful since it sets the surface to be NULL which means that there is no surface for which to classify critical points. This is just here so that you can declare a NewtonClassify value without having to initialize it at the same time.

Definition at line 19 of file NewtonClassify.cpp.

References setSurface().

NewtonClassify::NewtonClassify Implicit surf  ) 
 

Constructs an object containing critical points for a given Implicit.

You MUST pass in an Implicit surface.

Parameters:
surf The implicit surface to be used when classifying critical points.

Definition at line 30 of file NewtonClassify.cpp.

References setSurface(), and surf.


Member Function Documentation

void NewtonClassify::classify gmVector3  p  ) 
 

Finds the eigen vectors and eigen values of a given point.

The resulting values are stored in the class members eigenVectors and eigenValues. Also, this method figures out the "kind" of the point by counting the number of positive eigen values and setting the criticalKind member. It also stores the index of the eigen value that had a different sign from the rest, or -1 if all eigen values were of the same sign.

Parameters:
p The point used to find eigen vectors/values with the current Implicit surface.
Note:
This method sets the object members eigenvectors, eigenvalues, criticalKind, and differentEigenIndex.

Definition at line 104 of file NewtonClassify.cpp.

References countPosEigenValues(), CPKind, criticalKind, eigenValues, eigenVectors, getSurface(), Implicit::hess(), Jacobi::solve(), Jacobi::sort(), Jacobi::values, and Jacobi::vectors.

void NewtonClassify::classify PointList  roots  ) 
 

Finds the eigen vectors/values for all critical points in PointList.

The eigen vectors of the points are stored in the fVectors list. The eigen values of the points are stored in the fValues list. The kinds of the points are stored in the fKinds list.

Parameters:
roots A list of roots previously found by Newton which we want to classify.
Note:
This method sets the object members fKinds, fVectors, and fValues. These three lists correspond to the kinds, eigenvectors, and eigenvalues of the passed-in roots.

Definition at line 71 of file NewtonClassify.cpp.

References criticalKind, eigenValues, eigenVectors, fKinds, fValues, fVectors, getSurface(), and PointList.

Referenced by SearchCritical::classify().

int NewtonClassify::countPosEigenValues  )  [private]
 

Determine the number of positive roots and the differentEigenIndex.

This is called by classify(gmVector3) after the eigen values are found.

Returns:
The number of positive eigen values in the eigenValues member.
Note:
This method also sets the object's differentEigenIndex value which indicates which eigen value was a "different sign" from the others, or -1 if all of the eigen values are all the same sign.

Definition at line 126 of file NewtonClassify.cpp.

References differentEigenIndex, eigenValues, and getSurface().

Referenced by classify().

Implicit * NewtonClassify::getSurface  )  [virtual]
 

Returns the current surface being searched.

This method is virtual and should be overridden (along with setSurface(Implicit*)) to keep the surface variable consistent.

Returns:
The Implicit surface being searched for critical points.
See also:
setSurface(Implicit*)

Reimplemented in SearchCritical.

Definition at line 55 of file NewtonClassify.cpp.

References surface.

Referenced by classify(), and countPosEigenValues().

void NewtonClassify::setSurface Implicit surf  )  [virtual]
 

Changes the surface to search.

This method is called by the constructors to set up the private surface variable. It is also virtual and should be overridden (along with getSurface()) to keep the surface variable consistent.

Parameters:
surf The new Implicit surface to search for critical points.
See also:
getSurface()

Reimplemented in SearchCritical.

Definition at line 43 of file NewtonClassify.cpp.

References surf, and surface.

Referenced by NewtonClassify().


Member Data Documentation

CPKind NewtonClassify::criticalKind
 

The resulting kind of root after a call to classify(gmVector3).

Definition at line 62 of file NewtonClassify.h.

Referenced by classify().

int NewtonClassify::differentEigenIndex
 

The index of the eigen value/vector that has a different sign from the others, or -1 if all eigen values are the same sign.

Definition at line 67 of file NewtonClassify.h.

Referenced by countPosEigenValues().

gmVector3 NewtonClassify::eigenValues
 

The resulting eigen values after a call to classify(gmVector3).

Definition at line 60 of file NewtonClassify.h.

Referenced by classify(), and countPosEigenValues().

gmMatrix3 NewtonClassify::eigenVectors
 

The resulting eigen vectors after a call to classify(gmVector3).

Definition at line 58 of file NewtonClassify.h.

Referenced by classify().

std::vector<CPKind> NewtonClassify::fKinds
 

A list of the kind of each critical point in the fRoots list.

Definition at line 47 of file NewtonClassify.h.

Referenced by classify(), CriticalPointInterrogator::cleanup(), and SearchCritical::display().

std::vector<gmVector3> NewtonClassify::fValues
 

A list of the eigen values of each critical point in fRoots.

Definition at line 51 of file NewtonClassify.h.

Referenced by classify(), and CriticalPointInterrogator::cleanup().

std::vector<gmMatrix3> NewtonClassify::fVectors
 

A list of the eigen vectors of each critical point in fRoots.

Definition at line 49 of file NewtonClassify.h.

Referenced by classify(), and CriticalPointInterrogator::cleanup().

Implicit* NewtonClassify::surface [protected]
 

Classify critical points for this Implicit surface.

Reimplemented in SearchCritical.

Definition at line 40 of file NewtonClassify.h.

Referenced by getSurface(), and setSurface().


The documentation for this class was generated from the following files:
Generated on Mon Jun 28 15:02:30 2004 for Advanced Surface Library by doxygen 1.3.4