Point Class Reference

#include <Point.h>

List of all members.

Public Member Functions

 Point ()
 Point (const std::vector< parameter_t > &init, const std::vector< parameter_t > &min, const std::vector< parameter_t > &max)
 ~Point ()
void Randomize ()
double operator* (const FeatureStats &) const
const Point operator+ (const Point &) const
void operator+= (const Point &)
const Point operator* (float) const
void Normalize ()
void NormalizeL2 ()
void NormalizeL1 ()
void GetAllWeights (std::vector< parameter_t > &w) const
statscore_t GetScore () const
void SetScore (statscore_t score)

Static Public Member Functions

static unsigned int getdim ()
static void setdim (std::size_t d)
static unsigned int getpdim ()
static void setpdim (std::size_t pd)
static void set_optindices (const std::vector< unsigned int > &indices)
static const std::vector
< unsigned int > & 
get_optindices ()
static bool OptimizeAll ()

Friends

class Optimizer
std::ostream & operator<< (std::ostream &o, const Point &P)


Detailed Description

A class that handles the subset of the Feature weight on which we run the optimization.

Definition at line 16 of file Point.h.


Constructor & Destructor Documentation

Point::Point (  ) 

Definition at line 23 of file Point.cpp.

Point::Point ( const std::vector< parameter_t > &  init,
const std::vector< parameter_t > &  min,
const std::vector< parameter_t > &  max 
)

Point::~Point (  ) 

Definition at line 50 of file Point.cpp.


Member Function Documentation

static const std::vector<unsigned int>& Point::get_optindices (  )  [inline, static]

Definition at line 62 of file Point.h.

void Point::GetAllWeights ( std::vector< parameter_t > &  w  )  const

Return a vector of size m_pdim where all weights have been put (including fixed ones).

Referenced by operator<<().

Here is the caller graph for this function:

static unsigned int Point::getdim (  )  [inline, static]

Definition at line 52 of file Point.h.

Referenced by BOOST_AUTO_TEST_CASE(), Optimizer::LineOptimize(), and SimpleOptimizer::TrueRun().

Here is the caller graph for this function:

static unsigned int Point::getpdim (  )  [inline, static]

Definition at line 55 of file Point.h.

statscore_t Point::GetScore (  )  const [inline]

Definition at line 99 of file Point.h.

Referenced by BOOST_AUTO_TEST_CASE(), Optimizer::Run(), RandomDirectionOptimizer::TrueRun(), and SimpleOptimizer::TrueRun().

Here is the caller graph for this function:

void Point::Normalize (  )  [inline]

Definition at line 89 of file Point.h.

References NormalizeL2().

Here is the call graph for this function:

void Point::NormalizeL1 (  ) 

Definition at line 133 of file Point.cpp.

Referenced by main().

Here is the caller graph for this function:

void Point::NormalizeL2 (  ) 

Definition at line 120 of file Point.cpp.

Referenced by Normalize().

Here is the caller graph for this function:

const Point Point::operator* ( float  l  )  const

Definition at line 100 of file Point.cpp.

double Point::operator* ( const FeatureStats F  )  const

Definition at line 62 of file Point.cpp.

References FeatureStats::get(), and OptimizeAll().

Here is the call graph for this function:

const Point Point::operator+ ( const Point p2  )  const

Definition at line 79 of file Point.cpp.

References CHECK.

void Point::operator+= ( const Point p2  ) 

Definition at line 91 of file Point.cpp.

References CHECK.

static bool Point::OptimizeAll (  )  [inline, static]

Definition at line 66 of file Point.h.

Referenced by operator*().

Here is the caller graph for this function:

void Point::Randomize (  ) 

Definition at line 52 of file Point.cpp.

References CHECK.

Referenced by RandomOptimizer::TrueRun(), RandomDirectionOptimizer::TrueRun(), and SimpleOptimizer::TrueRun().

Here is the caller graph for this function:

static void Point::set_optindices ( const std::vector< unsigned int > &  indices  )  [inline, static]

Definition at line 58 of file Point.h.

Referenced by main().

Here is the caller graph for this function:

static void Point::setdim ( std::size_t  d  )  [inline, static]

Definition at line 53 of file Point.h.

Referenced by BOOST_AUTO_TEST_CASE(), and main().

Here is the caller graph for this function:

static void Point::setpdim ( std::size_t  pd  )  [inline, static]

Definition at line 56 of file Point.h.

Referenced by main().

Here is the caller graph for this function:

void Point::SetScore ( statscore_t  score  )  [inline]

Definition at line 100 of file Point.h.

Referenced by Optimizer::LineOptimize(), Optimizer::Run(), and RandomOptimizer::TrueRun().

Here is the caller graph for this function:


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const Point P 
) [friend]

Write the Whole featureweight to a stream (ie m_pdim float).

friend class Optimizer [friend]

Definition at line 18 of file Point.h.


The documentation for this class was generated from the following files:

Generated on Sat Jun 30 00:30:12 2012 for Moses by  doxygen 1.5.9