ConflictResolvingLeftArrowRule.cc

00001 
00002 
00003 
00004 
00005 //  This program is free software: you can redistribute it and/or modify
00006 //  it under the terms of the GNU General Public License as published by
00007 //  the Free Software Foundation, version 3 of the License.
00008 //
00009 //  This program is distributed in the hope that it will be useful,
00010 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 //  GNU General Public License for more details.
00013 //
00014 //  You should have received a copy of the GNU General Public License
00015 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 
00017 #include "SimpleCenterLeftArrowRule.h"
00018 
00019 SimpleCenterLeftArrowRule::SimpleCenterLeftArrowRule
00020 (const std::string &name,
00021  const SymbolPair &center,
00022  const OtherSymbolTransducerVector &contexts):
00023   LeftArrowRule(name,OtherTransducer(center.first,center.second),contexts)
00024 {}
00025 
00026 bool SimpleCenterLeftArrowRule::conflicts_this
00027 (SimpleCenterLeftArrowRule &another)
00028 { return context.is_empty_intersection(another); }
00029 
00030 bool SimpleCenterLeftArrowRule::resolvable_conflict
00031 (SimpleCenterLeftArrowRule &another)
00032 { return context.is_subset(another); }
00033 
00034 void SimpleCenterLeftArrowRule::resolve_conflict
00035 (const SimpleCenterLeftArrowRule &another)
00036 { context.apply(&HfstTransducer::subtract,another); }
00037 
 All Classes Files Functions Typedefs Enumerations Defines
Generated on Wed Dec 15 01:11:58 2010 for hfst-twolc (documentation under construction) by  doxygen 1.6.3