diff --git a/MakefileNoOTB b/MakefileNoOTB index f508653..0fc1e0f 100644 --- a/MakefileNoOTB +++ b/MakefileNoOTB @@ -83,9 +83,9 @@ clean: find . -type f '(' -name '#*' -o -name '*~' ')' -print -exec rm -f '{}' \; wipe: clean - rm -rf $(OBJ_DIR) - rm -f $(APG_OUT) $(TST_OUT) $(PRF_OUT) $(LIB_DIR)/libtriskele.a - rm -f $(OUT_DIR)/*.d + -rm -rf $(OBJ_DIR) + -rm -f $(APG_OUT) $(TST_OUT) $(PRF_OUT) $(TTH_OUT) $(LIB_DIR)/libtriskele.a + -rm -f $(OUT_DIR)/*.d -rmdir $(OUT_DIR) $(OBJ_DIR) $(LIB_DIR) $(BLD_DIR) libtriskele: $(LIB_DIR)/libtriskele.a diff --git a/documentation/GitInfos.org b/documentation/GitInfos.org index f840646..c93b306 100644 --- a/documentation/GitInfos.org +++ b/documentation/GitInfos.org @@ -74,6 +74,10 @@ Triskele suit partiellement le [[https://nvie.com/posts/a-successful-git-branchi # Il est possible d'annuler le traitement en cas de conflit $ git merge --abort +- Abandonner les modifications locales + # Repart de la version du serveur en plus rapide (et garde les fichiers hors projet) + $ git reset --hard origin/master + - Etiquetage de version # Choisir la branch master git checkout master diff --git a/include/ArrayTree/Weight.hpp b/include/ArrayTree/Weight.hpp index 3c66027..f98fa94 100644 --- a/include/ArrayTree/Weight.hpp +++ b/include/ArrayTree/Weight.hpp @@ -76,15 +76,10 @@ namespace otb { }; // ======================================== - /*! Structure intégrant la façon dont est géré un poids pour un AlphaTree car la fonction calcul la distance minimum (0 dans les feuilles) */ + /*! Structure intégrant la façon dont est géré un poids pour un AlphaTree car la fonction calcul la distance minimum (0 dans les feuilles comme MinTree donc comme MaxWeight) */ template struct DiffWeight : public WeightBase { typedef WeightBase WB; - inline bool getDecr () const; - static inline bool isWeightInf (const WeightT &a, const WeightT &b); - static inline bool isEdgeInf (const Edge &a, const Edge &b); - static inline void sort (Edge *edges, DimEdge count); - inline DiffWeight (); inline DiffWeight (const PixelT *pixels, const Size &size); inline DiffWeight (const DiffWeight &model, const PixelT *pixels, const Size &size); @@ -94,7 +89,7 @@ namespace otb { }; // ======================================== - /*! Structure intégrant la façon dont est géré un poids pour un TreeOfShape car la fonction calcul la distance à la médiane (distance maximum dans les feuilles) */ + /*! Structure intégrant la façon dont est géré un poids pour un TreeOfShape car la fonction calcul la distance à la médiane (distance maximum dans les feuilles donc comme MaxTree donc comme MinWeight) */ template struct MedianWeight : public WeightBase { typedef WeightBase WB; protected: @@ -102,6 +97,11 @@ namespace otb { WeightT thresholdWeight; public: + inline bool getDecr () const; + static inline bool isWeightInf (const WeightT &a, const WeightT &b); + static inline bool isEdgeInf (const Edge &a, const Edge &b); + static inline void sort (Edge *edges, DimEdge count); + inline const PixelT &getMedian () const; inline const PixelT &getThresholdPixel () const; inline const WeightT &getThresholdWeight () const; diff --git a/include/ArrayTree/Weight.tpp b/include/ArrayTree/Weight.tpp index c85f2b8..013f1ec 100644 --- a/include/ArrayTree/Weight.tpp +++ b/include/ArrayTree/Weight.tpp @@ -187,30 +187,6 @@ MaxWeight::getWeight (const Point &a, const Point &b) const { } // ======================================== -template -inline bool -DiffWeight::getDecr () const { - return true; -} - -template -inline bool -DiffWeight::isWeightInf (const WeightT &a, const WeightT &b) { - return a > b; -} - -template -inline bool -DiffWeight::isEdgeInf (const Edge &a, const Edge &b) { - return isWeightInf (a.weight, b.weight); -} - -template -inline void -DiffWeight::sort (Edge *edges, DimEdge count) { - std::sort (edges, edges+count, isEdgeInf); -} - template inline DiffWeight::DiffWeight () @@ -243,6 +219,30 @@ DiffWeight::getWeight (const Point &a, const Point &b) const { } // ======================================== +template +inline bool +MedianWeight::getDecr () const { + return true; +} + +template +inline bool +MedianWeight::isWeightInf (const WeightT &a, const WeightT &b) { + return a > b; +} + +template +inline bool +MedianWeight::isEdgeInf (const Edge &a, const Edge &b) { + return isWeightInf (a.weight, b.weight); +} + +template +inline void +MedianWeight::sort (Edge *edges, DimEdge count) { + std::sort (edges, edges+count, isEdgeInf); +} + template inline const PixelT & MedianWeight::getMedian () const {