| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/stat/TeTreeMinimum.h
Go to the documentation of this file.

    00001 /************************************************************************************
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright © 2001-2004 INPE and Tecgraf/PUC-Rio.
    00004
    00005 This code is part of the TerraLib library.
    00006 This library is free software; you can redistribute it and/or
    00007 modify it under the terms of the GNU Lesser General Public
    00008 License as published by the Free Software Foundation; either
    00009 version 2.1 of the License, or (at your option) any later version.
    00010
    00011 You should have received a copy of the GNU Lesser General Public
    00012 License along with this library.
    00013
    00014 The authors reassure the license terms regarding the warranties.
    00015 They specifically disclaim any warranties, including, but not limited to,
    00016 the implied warranties of merchantability and fitness for a particular purpose.
    00017 The library provided hereunder is on an "as is" basis, and the authors have no
    00018 obligation to provide maintenance, support, updates, enhancements, or modifications.
    00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
    00020 indirect, special, incidental, or consequential damages arising out of the use
    00021 of this library and its documentation.
    00022 *************************************************************************************/
    00023
    00027 #ifndef  __TERRALIB_INTERNAL_TREEMINIMUM_H
    00028 #define  __TERRALIB_INTERNAL_TREEMINIMUM_H
    00029
    00030 #include <vector>
    00031 #include <map>
    00032 #include <string>
    00033
    00034 class TeSTElementSet;
    00035 class TeGeneralizedProxMatrix;
    00036
    00037 using namespace std;
    00038
    00039 class TeMSTGraphLink
    00040 {
    00041 public:
    00042            string GeoId1_;
    00043            string GeoId2_;
    00044            double Dissimilarity_;
    00045
    00046            ~TeMSTGraphLink()
    00047            {}
    00048
    00049
    00050            TeMSTGraphLink() :
    00051                       GeoId1_(""),
    00052                       GeoId2_("")
    00053            {}
    00054
    00055            TeMSTGraphLink(const string& GeoId1, const string& GeoId2):
    00056                       GeoId1_(GeoId1),
    00057                       GeoId2_(GeoId2)
    00058            {}
    00059
    00060            TeMSTGraphLink(const string& GeoId1, const string& GeoId2, const double Dissimilarity)  :
    00061                       GeoId1_(GeoId1),
    00062                       GeoId2_(GeoId2),
    00063                       Dissimilarity_(Dissimilarity)
    00064            {}
    00065
    00066
    00067            void set_Dissimilatiry (const double Dissimilarity)
    00068            {          Dissimilarity_ = Dissimilarity;  }
    00069
    00070            bool compare_dissimilarity(const TeMSTGraphLink& graph_link1, const TeMSTGraphLink& graph_link2);
    00071 };
    00072
    00073
    00074
    00075 typedef vector<TeMSTGraphLink> TeMSTGraph;
    00076
    00077 typedef map<string,TeMSTGraph> TeMSTMatrix;
    00078
    00080 void TeCreateDissMatrix (TeSTElementSet* Objects, TeGeneralizedProxMatrix* proxMatrix, TeMSTMatrix& mat_diss, double& Diss_max);
    00081
    00083 void TeCreateMinimumTree (TeSTElementSet* Objects, TeMSTMatrix& DissMatrix, TeMSTGraph& Min_Tree, double Diss_max);
    00084
    00086 void TeCreateSubTrees(TeSTElementSet* objects, TeMSTGraph& Min_Tree, int num_regioes);
    00087
    00088 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines