MASA-Core
AbstractBlockPruning.hpp
Go to the documentation of this file.
00001 /*******************************************************************************
00002  *
00003  * Copyright (c) 2010-2015   Edans Sandes
00004  *
00005  * This file is part of MASA-Core.
00006  * 
00007  * MASA-Core is free software: you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation, either version 3 of the License, or
00010  * (at your option) any later version.
00011  * 
00012  * MASA-Core is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License
00018  * along with MASA-Core.  If not, see <http://www.gnu.org/licenses/>.
00019  *
00020  ******************************************************************************/
00021 
00022 #ifndef ABSTRACTBLOCKPRUNING_HPP_
00023 #define ABSTRACTBLOCKPRUNING_HPP_
00024 
00025 #include "../libmasaTypes.hpp"
00026 #include "../Grid.hpp"
00027 #include "../IManager.hpp" // for the recurrence types
00028 
00029 class AbstractBlockPruning {
00030 public:
00031         AbstractBlockPruning();
00032         virtual ~AbstractBlockPruning();
00033 
00034         void updateBestScore(int score);
00035         const Grid* getGrid() const;
00036         void setGrid(const Grid* grid);
00037         void setSuperPartition(Partition superPartition);
00038         void setScoreParams(const score_params_t* score_params);
00039         void setLocalAlignment();
00040         void setGlobalAlignment();
00041         int getRecurrenceType() const;
00042         void setRecurrenceType(int recurrenceType);
00043 
00044 protected:
00045         bool isBlockPrunable(int bx, int by, int score);
00046 
00047 
00048 
00049 private:
00050         const score_params_t* score_params;
00051 
00052         int  max_i;
00053         int  max_j;
00054 
00055         int  bestScore;
00056 
00057         int  recurrenceType;
00058 
00059         const Grid* grid;
00060 
00061 
00062         virtual void initialize() = 0;
00063         virtual void finalize() = 0;
00064 };
00065 
00066 #endif /* ABSTRACTBLOCKPRUNING_HPP_ */