TapePositioningSystem/Triangulator.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of TapePositioningSystem.
00004 **
00005 **  This file may be distributed and/or modified under the terms of the
00006 **  GNU General Public License version 2 or 3 as published by the Free
00007 **  Software Foundation and appearing in the file LICENSE.GPL included
00008 **  in the packaging of this file.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00013 **  more details.
00014 **
00015 **  You should have received a copy of the GNU General Public License
00016 **  along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 **
00018 **  
00019 **
00020 **  Created: 2012-11-15
00021 **  Authors:
00022 **    Marc Wathelet (ISTerre, Grenoble, France)
00023 **
00024 ***************************************************************************/
00025 
00026 #ifndef TRIANGULATOR_H
00027 #define TRIANGULATOR_H
00028 
00029 #include <QGpCoreTools.h>
00030 
00031 #include "TapePositioningSystemDLLExport.h"
00032 
00033 namespace TapePositioningSystem {
00034 
00035   class Node;
00036   class Cluster;
00037 
00038   class TAPEPOSITIONINGSYSTEM_EXPORT Triangulator
00039   {
00040   public:
00041     Triangulator();
00042     ~Triangulator();
00043 
00044     Node * addNode(const QString& name);
00045     Node * node(const QString& name) const;
00046     QList<Node *> nodes() const {return _nodes.values();}
00047 
00048     void addDistance(const QString& node1, const QString& node2, double value);
00049 
00050     void aggregate(double stddev);
00051     void setCoordinates(Node * origin, Node * north, Node * eastward);
00052     void printClusters();
00053     void setPriorCoordinates(const QMap<QString, Point>& c, double precision);
00054     QSet<Point2D> solutions(const QString& nodeName) const;
00055     Covariance covariance(const QString& nodeName) const;
00056   private:
00057     void aggregate(Cluster * parent, QList<Cluster *> quads);
00058 
00059     QMap<QString, Node *> _nodes;
00060     QList<Cluster *> _clusters;
00061   };
00062 
00063 } // namespace TapePositioningSystem
00064 
00065 #endif // TRIANGULATOR_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines