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

cost_de.h

Go to the documentation of this file.
00001 /* unit_cost.h    $Revision: 1.2 $ $Date: 2005/12/10 20:33:54 $
00002    Copyright (C) 2000 University of Bonn.
00003    http://www.ikp.uni-bonn.de/boss
00004 
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU General Public License
00007    as published by the Free Software Foundation; either version 2
00008    of the License, or (at your option) any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software
00017    Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA  02111-1307, USA.
00019 */
00020 
00028 #ifndef COST_DE_H
00029 #define COST_DE_H
00030 
00031 using namespace std;
00032 
00033 #include "tdsp/dsp_distances.h"
00034 #include "boss_utility/boss_config.h"
00035 #include "cost.h"
00036 #include "boss_node.h"
00037 
00045 class CostDE: public Cost {
00046  private:
00047   dsp::Euclid< float > euclid;
00048   inline unsigned CostDE::translateStress (unsigned s) const {
00049     if (s == 1) s = 2;
00050     else if (s == 2) s = 1;
00051     return s;
00052   }
00053   double stress_cost(const BOSS_Node * u) const;
00054   double phrasing_cost(const BOSS_Node * u) const;
00055   double duration_cost(const BOSS_Node * u) const;
00056   double treal_cost(const BOSS_Node * u) const;
00057   float mel_dist(const BOSS_Node * l, const BOSS_Node * r) const;
00058   //  float lpc_dist(const BOSS_Node & l, const BOSS_Node & r) const;
00059   float f0_dist(const BOSS_Node * l, const BOSS_Node * r) const;
00060   bool isSibilant(const string & s) const;
00061   bool isNasal(const string & s) const;
00062  public:
00063    CostDE(BOSS::Config & __cl);
00064   ~CostDE();
00065   float operator () (const BOSS_Node * l, const BOSS_Node * r);
00066   double operator () (const BOSS_Node * u) const;
00067 };
00068  //end of boss_unitselection group
00070 #endif
00071 

Generated on Tue Dec 20 23:14:38 2005 for BOSS by doxygen 1.3.6