diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fec78a0..8e2c4e84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,90 +1,89 @@ ## # This file is part of Rocs. # Copyright 2008-2011 Tomaz Canabrava # Copyright 2010 Wagner Reck # Copyright 2011-2014 Andreas Cord-Landwehr # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ## project(rocs) cmake_minimum_required(VERSION 3.0.0) find_package(ECM 5.15.0 REQUIRED NO_MODULE) find_package(KF5DocTools) find_package(Boost "1.49" REQUIRED) find_package(Grantlee5 "5.0.0" REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) include(ECMAddAppIcon) include(ECMAddTests) include(ECMInstallIcons) include(ECMOptionalAddSubdirectory) include(ECMSetupVersion) include(KDEInstallDirs) include(KDECompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) include(FeatureSummary) include(GenerateExportHeader) find_package(Qt5 5.4 REQUIRED NO_MODULE COMPONENTS Core Gui QuickWidgets Script WebKit WebKitWidgets Widgets ScriptTools Svg Test XmlPatterns ) find_package(KF5 5.15 REQUIRED COMPONENTS Archive Config CoreAddons Crash Declarative I18n ItemViews TextEditor XmlGui ) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${Boost_INCLUDE_DIRS} ) -add_definitions(-fext-numeric-literals) add_definitions(-DQT_NO_CAST_TO_ASCII) add_definitions(-DQT_NO_URL_CAST_FROM_STRING) remove_definitions(-DQT_NO_CAST_FROM_ASCII) remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY) remove_definitions(-DQT_NO_KEYWORDS) ecm_optional_add_subdirectory(libgraphtheory) ecm_optional_add_subdirectory(src) ecm_optional_add_subdirectory(icons) if(KF5DocTools_FOUND) ecm_optional_add_subdirectory(doc) endif() set_package_info(Boost "Boost C++ Libraries" "http://www.boost.org") feature_summary(WHAT ALL) install(FILES org.kde.rocs.appdata.xml DESTINATION ${CMAKE_INSTALL_METAINFODIR}) diff --git a/libgraphtheory/modifiers/topology.h b/libgraphtheory/modifiers/topology.h index f58c49af..a0fda07d 100644 --- a/libgraphtheory/modifiers/topology.h +++ b/libgraphtheory/modifiers/topology.h @@ -1,84 +1,86 @@ /* * Copyright 2011-2014 Andreas Cord-Landwehr * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . */ #ifndef TOPOLOGY_H #define TOPOLOGY_H #include "typenames.h" #include "graphtheory_export.h" +#define BOOST_MATH_DISABLE_FLOAT128 1 + namespace GraphTheory { /** \brief this class provides topology modifiers for graphs * * Methods of this class either can be applied to graphs to * make unique changes or connected to specific re-format signals to * apply a given topology after every change of the structure. */ class GRAPHTHEORY_EXPORT Topology { public: Topology(); virtual ~Topology(); /** \brief applies Fruchterman-Reingold cut minimization * * For the given node set this algorithm applies the Boost implementation * of the Frutherman-Reingold force directed layout algorithm to minimize * crossing edges. Data must be element of the same graph. The * crossings of all present edges contained in this graph are * minimized. This method directly modifies the node. * \param nodeList is the list of all nodes * \return void */ void applyMinCutTreeAlignment(NodeList nodes); /** \brief applies Circle topology to node set * * For the given node set this algorithm applies the Boost implementation * to create a circle layout. If a radius is specified, the circle will get the specified radius, * otherwise with no radius set the diameter of the minimal bounding box of all node positions * is used to determine the radius. * \param nodeList is the list of all nodes * \param radius to optionally specify target radius * \return void */ void applyCircleAlignment(NodeList nodes, qreal radius=0); /** \brief applies a default topology for undirected graphs * * Use this method to apply a best-fit topology to an undirected graph (though the * graph need not to be of type "Graph") only based on the node connections. * I.e., no possible present coordinates are respected. */ void directedGraphDefaultTopology(GraphDocumentPtr document); /** \brief applies a default topology for undirected graphs * * Use this method to apply a best-fit topology to an undirected graph (though the * graph need not to be of type "Graph") only based on the node connections. * I.e., no possible present coordinates are respected. */ void undirectedGraphDefaultTopology(GraphDocumentPtr document); }; } #endif