contrib/rpl/rgrl/rgrl_weighter.h
Go to the documentation of this file.
00001 #ifndef rgrl_weighter_h_
00002 #define rgrl_weighter_h_
00003 //:
00004 // \file
00005 // \brief  Base class to compute weights.  Main function is pure virtual.
00006 // \author Chuck Stewart
00007 // \date   25 Nov 2002
00008 
00009 #include <vcl_cassert.h>
00010 #include "rgrl_scale_sptr.h"
00011 #include "rgrl_match_set_sptr.h"
00012 #include "rgrl_object.h"
00013 
00014 class rgrl_transformation;
00015 
00016 //: Compute the weights based on the scales and matches.
00017 //
00018 class rgrl_weighter
00019   : public rgrl_object
00020 {
00021  public:
00022   virtual ~rgrl_weighter();
00023 
00024   //:  based on the scales, compute the weights for the matches.
00025   //
00026   // The resulting weights will be stored in the match_set structure.
00027   //
00028   virtual
00029   void compute_weights( rgrl_scale const&     scales,
00030                         rgrl_match_set&       match_set ) const = 0;
00031 
00032   // Defines type-related functions
00033   rgrl_type_macro( rgrl_weighter,  rgrl_object);
00034 
00035   // Auxiliary functions related to the m_est
00036   virtual double
00037   aux_sum_weighted_residuals( rgrl_scale const&           /*scale*/,
00038                               rgrl_match_set&             /*match_set*/,
00039                               rgrl_transformation const&  /*xform*/ ){ assert(!"NYI"); return 0;}
00040   virtual double
00041   aux_sum_rho_values( rgrl_scale const&           /*scale*/,
00042                       rgrl_match_set&             /*match_set*/,
00043                       rgrl_transformation const&  /*xform*/){ assert(!"NYI"); return 0 ;}
00044   virtual double
00045   aux_neg_log_likelihood( rgrl_scale const&           /*scale*/,
00046                           rgrl_match_set&             /*match_set*/,
00047                           rgrl_transformation const&  /*xform*/ ){ assert(!"NYI"); return 0;}
00048   virtual double
00049   aux_avg_neg_log_likelihood( rgrl_scale const&  /*scale*/,
00050                               rgrl_match_set&    /*match_set*/,
00051                               rgrl_transformation const&  /*xform*/ ){ assert(!"NYI"); return 0;}
00052 };
00053 
00054 #endif