Correction de la correction (trop de fatigue)
This commit is contained in:
parent
68491d83ec
commit
be9be859a0
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 <typename PixelT, typename WeightT> struct DiffWeight : public WeightBase<PixelT, WeightT> {
|
||||
typedef WeightBase<PixelT, WeightT> WB;
|
||||
|
||||
inline bool getDecr () const;
|
||||
static inline bool isWeightInf (const WeightT &a, const WeightT &b);
|
||||
static inline bool isEdgeInf (const Edge<WeightT> &a, const Edge<WeightT> &b);
|
||||
static inline void sort (Edge<WeightT> *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 <typename PixelT, typename WeightT> struct MedianWeight : public WeightBase<PixelT, WeightT> {
|
||||
typedef WeightBase<PixelT, WeightT> 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<WeightT> &a, const Edge<WeightT> &b);
|
||||
static inline void sort (Edge<WeightT> *edges, DimEdge count);
|
||||
|
||||
inline const PixelT &getMedian () const;
|
||||
inline const PixelT &getThresholdPixel () const;
|
||||
inline const WeightT &getThresholdWeight () const;
|
||||
|
@ -187,30 +187,6 @@ MaxWeight<PixelT, WeightT>::getWeight (const Point &a, const Point &b) const {
|
||||
}
|
||||
|
||||
// ========================================
|
||||
template <typename PixelT, typename WeightT>
|
||||
inline bool
|
||||
DiffWeight<PixelT, WeightT>::getDecr () const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename PixelT, typename WeightT>
|
||||
inline bool
|
||||
DiffWeight<PixelT, WeightT>::isWeightInf (const WeightT &a, const WeightT &b) {
|
||||
return a > b;
|
||||
}
|
||||
|
||||
template <typename PixelT, typename WeightT>
|
||||
inline bool
|
||||
DiffWeight<PixelT, WeightT>::isEdgeInf (const Edge<WeightT> &a, const Edge<WeightT> &b) {
|
||||
return isWeightInf (a.weight, b.weight);
|
||||
}
|
||||
|
||||
template <typename PixelT, typename WeightT>
|
||||
inline void
|
||||
DiffWeight<PixelT, WeightT>::sort (Edge<WeightT> *edges, DimEdge count) {
|
||||
std::sort (edges, edges+count, isEdgeInf);
|
||||
}
|
||||
|
||||
template <typename PixelT, typename WeightT>
|
||||
inline
|
||||
DiffWeight<PixelT, WeightT>::DiffWeight ()
|
||||
@ -243,6 +219,30 @@ DiffWeight<PixelT, WeightT>::getWeight (const Point &a, const Point &b) const {
|
||||
}
|
||||
|
||||
// ========================================
|
||||
template <typename PixelT, typename WeightT>
|
||||
inline bool
|
||||
MedianWeight<PixelT, WeightT>::getDecr () const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename PixelT, typename WeightT>
|
||||
inline bool
|
||||
MedianWeight<PixelT, WeightT>::isWeightInf (const WeightT &a, const WeightT &b) {
|
||||
return a > b;
|
||||
}
|
||||
|
||||
template <typename PixelT, typename WeightT>
|
||||
inline bool
|
||||
MedianWeight<PixelT, WeightT>::isEdgeInf (const Edge<WeightT> &a, const Edge<WeightT> &b) {
|
||||
return isWeightInf (a.weight, b.weight);
|
||||
}
|
||||
|
||||
template <typename PixelT, typename WeightT>
|
||||
inline void
|
||||
MedianWeight<PixelT, WeightT>::sort (Edge<WeightT> *edges, DimEdge count) {
|
||||
std::sort (edges, edges+count, isEdgeInf);
|
||||
}
|
||||
|
||||
template <typename PixelT, typename WeightT>
|
||||
inline const PixelT &
|
||||
MedianWeight<PixelT, WeightT>::getMedian () const {
|
||||
|
Loading…
Reference in New Issue
Block a user