summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-07-10 18:57:21 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-07-10 20:31:05 +0000
commit72641779266fa1d3d87cf57b686ae93cb4b2df0e (patch)
tree695bdf63dbaf810ec84b1519b2c0d6da9b394d65 /src/3rdparty
parentMove reproducible-builds hack out of CairoRenderContext (diff)
downloadinkscape-72641779266fa1d3d87cf57b686ae93cb4b2df0e.tar.gz
inkscape-72641779266fa1d3d87cf57b686ae93cb4b2df0e.zip
adaptagrams: sync with upstream
now at https://github.com/mjwybrow/adaptagrams/commit/c8e31964dc22605eec455b24c11909b4b1b8ca03 + https://github.com/mjwybrow/adaptagrams/pull/33 + https://github.com/mjwybrow/adaptagrams/pull/38
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/adaptagrams/libavoid/Doxyfile2472
-rw-r--r--src/3rdparty/adaptagrams/libavoid/connectionpin.cpp24
-rw-r--r--src/3rdparty/adaptagrams/libavoid/connector.cpp96
-rw-r--r--src/3rdparty/adaptagrams/libavoid/connector.h29
-rw-r--r--src/3rdparty/adaptagrams/libavoid/connend.cpp53
-rw-r--r--src/3rdparty/adaptagrams/libavoid/connend.h8
-rw-r--r--src/3rdparty/adaptagrams/libavoid/doc/description.doc16
-rw-r--r--src/3rdparty/adaptagrams/libavoid/geomtypes.cpp11
-rw-r--r--src/3rdparty/adaptagrams/libavoid/graph.cpp48
-rw-r--r--src/3rdparty/adaptagrams/libavoid/hyperedge.cpp22
-rw-r--r--src/3rdparty/adaptagrams/libavoid/hyperedgeimprover.cpp143
-rw-r--r--src/3rdparty/adaptagrams/libavoid/hyperedgeimprover.h2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/hyperedgetree.cpp36
-rw-r--r--src/3rdparty/adaptagrams/libavoid/junction.cpp13
-rw-r--r--src/3rdparty/adaptagrams/libavoid/junction.h4
-rwxr-xr-xsrc/3rdparty/adaptagrams/libavoid/libavoid.vcxproj3
-rw-r--r--src/3rdparty/adaptagrams/libavoid/makepath.cpp36
-rw-r--r--src/3rdparty/adaptagrams/libavoid/mtst.cpp183
-rw-r--r--src/3rdparty/adaptagrams/libavoid/mtst.h2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/obstacle.cpp22
-rw-r--r--src/3rdparty/adaptagrams/libavoid/orthogonal.cpp460
-rw-r--r--src/3rdparty/adaptagrams/libavoid/router.cpp50
-rw-r--r--src/3rdparty/adaptagrams/libavoid/router.h2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/scanline.cpp31
-rw-r--r--src/3rdparty/adaptagrams/libavoid/shape.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/2junctions.cpp22
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/complex.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/endlessLoop01.cpp30
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/example.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/forwardFlowingConnectors01.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/hola01.cpp4
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/hyperedgeLoop1.cpp14
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/inlineOverlap10.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/junction04.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/latesetup.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/nudgingSkipsCheckpoint01.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/penaltyRerouting01.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/performance01.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/removeJunctions01.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/tests/unsatisfiableRangeAssertion.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/vertices.cpp70
-rw-r--r--src/3rdparty/adaptagrams/libavoid/viscluster.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libavoid/visibility.cpp8
-rw-r--r--src/3rdparty/adaptagrams/libavoid/vpsc.cpp88
-rw-r--r--src/3rdparty/adaptagrams/libavoid/vpsc.h31
-rw-r--r--src/3rdparty/adaptagrams/libcola/README1
-rw-r--r--src/3rdparty/adaptagrams/libcola/cc_clustercontainmentconstraints.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/cc_nonoverlapconstraints.cpp113
-rw-r--r--src/3rdparty/adaptagrams/libcola/cc_nonoverlapconstraints.h124
-rw-r--r--src/3rdparty/adaptagrams/libcola/cluster.cpp24
-rw-r--r--src/3rdparty/adaptagrams/libcola/cola.cpp54
-rw-r--r--src/3rdparty/adaptagrams/libcola/cola.h139
-rw-r--r--src/3rdparty/adaptagrams/libcola/cola_log.h21
-rw-r--r--src/3rdparty/adaptagrams/libcola/colafd.cpp451
-rw-r--r--src/3rdparty/adaptagrams/libcola/commondefs.h5
-rw-r--r--src/3rdparty/adaptagrams/libcola/compound_constraints.cpp32
-rw-r--r--src/3rdparty/adaptagrams/libcola/compound_constraints.h2
-rw-r--r--src/3rdparty/adaptagrams/libcola/connected_components.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/doc/description.doc8
-rw-r--r--src/3rdparty/adaptagrams/libcola/gradient_projection.cpp21
-rw-r--r--src/3rdparty/adaptagrams/libcola/gradient_projection.h4
-rw-r--r--src/3rdparty/adaptagrams/libcola/output_svg.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/output_svg.h2
-rw-r--r--src/3rdparty/adaptagrams/libcola/shapepair.h2
-rw-r--r--src/3rdparty/adaptagrams/libcola/shortest_paths.h2
-rw-r--r--src/3rdparty/adaptagrams/libcola/straightener.cpp30
-rw-r--r--src/3rdparty/adaptagrams/libcola/straightener.h14
-rwxr-xr-xsrc/3rdparty/adaptagrams/libcola/tests/FixedRelativeConstraint01.cpp2
-rwxr-xr-xsrc/3rdparty/adaptagrams/libcola/tests/StillOverlap01.cpp2
-rwxr-xr-xsrc/3rdparty/adaptagrams/libcola/tests/StillOverlap02.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/boundary.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/constrained.cpp4
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/containment.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/containment2.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/convex_hull.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/cycle_detector.cpp18
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/gml_graph.cpp8
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/graphlayouttest.h12
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/initialOverlap.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/large_graph.cpp10
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/makefeasible.cpp34
-rwxr-xr-xsrc/3rdparty/adaptagrams/libcola/tests/makefeasible02.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/max_acyclic_subgraph.cpp14
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/overlappingClusters01.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/overlappingClusters02.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/overlappingClusters04.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/page_bounds.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/planar.cpp4
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/random_graph.cpp6
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/rectangularClusters01.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/rectclustershapecontainment.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/resize.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/small_graph.cpp6
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/topology.cpp4
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/trees.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libcola/tests/unconstrained.cpp4
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/CMakeLists.txt1
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/README1
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/assertions.h2
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/block.cpp60
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/block.h2
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/blocks.cpp6
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/cbuffer.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/constraint.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/doc/description.doc8
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/isnan.h74
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/linesegment.h10
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/pairing_heap.h62
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/rectangle.cpp29
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/solve_VPSC.cpp24
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/tests/rectangleoverlap.cpp2
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/tests/satisfy_inc.cpp12
-rw-r--r--src/3rdparty/adaptagrams/libvpsc/variable.h2
113 files changed, 3227 insertions, 2344 deletions
diff --git a/src/3rdparty/adaptagrams/libavoid/Doxyfile b/src/3rdparty/adaptagrams/libavoid/Doxyfile
index bfe8bf8bd..929c6d3c6 100644
--- a/src/3rdparty/adaptagrams/libavoid/Doxyfile
+++ b/src/3rdparty/adaptagrams/libavoid/Doxyfile
@@ -1,110 +1,129 @@
-# Doxyfile 1.8.3
+# Doxyfile 1.8.13
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
#
-# All text after a hash (#) is considered a comment and will be ignored.
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ").
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
DOXYFILE_ENCODING = UTF-8
-# The PROJECT_NAME tag is a single word (or sequence of words) that should
-# identify the project. Note that if you do not use Doxywizard you need
-# to put quotes around the project name if it contains spaces.
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
PROJECT_NAME = libavoid
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
PROJECT_NUMBER =
# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer
-# a quick idea about the purpose of the project. Keep the description short.
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF =
-# With the PROJECT_LOGO tag one can specify an logo or icon that is
-# included in the documentation. The maximum height of the logo should not
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
PROJECT_LOGO =
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
CREATE_SUBDIRS = NO
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES = NO
+
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
OUTPUT_LANGUAGE = English
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
BRIEF_MEMBER_DESC = YES
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
+# The default value is: YES.
REPEAT_BRIEF = YES
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
ABBREVIATE_BRIEF =
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
+# doxygen will generate a detailed section even if there is only a brief
# description.
+# The default value is: NO.
ALWAYS_DETAILED_SEC = NO
@@ -112,247 +131,285 @@ ALWAYS_DETAILED_SEC = NO
# inherited members of a class in the documentation of that class as if those
# members were ordinary class members. Constructors, destructors and assignment
# operators of the base classes will not be shown.
+# The default value is: NO.
INLINE_INHERITED_MEMB = YES
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
FULL_PATH_NAMES = YES
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip. Note that you specify absolute paths here, but also
-# relative paths, which will be relative from the directory where doxygen is
-# started.
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
STRIP_FROM_PATH =
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
STRIP_FROM_INC_PATH =
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
SHORT_NAMES = NO
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
JAVADOC_AUTOBRIEF = NO
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
QT_AUTOBRIEF = NO
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
MULTILINE_CPP_IS_BRIEF = NO
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
INHERIT_DOCS = YES
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
SEPARATE_MEMBER_PAGES = NO
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
TAB_SIZE = 8
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding
-# "class=itcl::class" will allow you to use the command class in the
-# itcl::class meaning.
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
TCL_SUBST =
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
OPTIMIZE_OUTPUT_FOR_C = NO
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
OPTIMIZE_OUTPUT_JAVA = NO
# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
OPTIMIZE_FOR_FORTRAN = NO
# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
OPTIMIZE_OUTPUT_VHDL = NO
# Doxygen selects the parser to use depending on the extension of the files it
# parses. With this tag you can assign which parser to use for a given
# extension. Doxygen has a built-in mapping, but you can override or extend it
-# using this tag. The format is ext=language, where ext is a file extension,
-# and language is one of the parsers supported by doxygen: IDL, Java,
-# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C,
-# C++. For instance to make doxygen treat .inc files as Fortran files (default
-# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note
-# that for custom extensions you also need to set FILE_PATTERNS otherwise the
-# files are not read by doxygen.
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
EXTENSION_MAPPING =
-# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
-# comments according to the Markdown format, which allows for more readable
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you
-# can mix doxygen, HTML, and XML commands with Markdown formatting.
-# Disable only in case of backward compatibilities issues.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
MARKDOWN_SUPPORT = YES
-# When enabled doxygen tries to link words that correspond to documented classes,
-# or namespaces to their corresponding documentation. Such a link can be
-# prevented in individual cases by by putting a % sign in front of the word or
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 0.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS = 0
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
AUTOLINK_SUPPORT = YES
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
BUILTIN_STL_SUPPORT = NO
# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
+# The default value is: NO.
CPP_CLI_SUPPORT = NO
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
SIP_SUPPORT = NO
# For Microsoft's IDL there are propget and propput attributes to indicate
-# getter and setter methods for a property. Setting this option to YES (the
-# default) will make doxygen replace the get and set methods by a property in
-# the documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
IDL_PROPERTY_SUPPORT = YES
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
+# tag is set to YES then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
+# The default value is: NO.
DISTRIBUTE_GROUP_DOC = NO
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
SUBGROUPING = YES
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
INLINE_GROUPED_CLASSES = NO
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
INLINE_SIMPLE_STRUCTS = NO
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
TYPEDEF_HIDES_STRUCT = NO
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE = 0
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
LOOKUP_CACHE_SIZE = 0
@@ -360,346 +417,409 @@ LOOKUP_CACHE_SIZE = 0
# Build related configuration options
#---------------------------------------------------------------------------
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
EXTRACT_ALL = NO
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
EXTRACT_PRIVATE = NO
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
# scope will be included in the documentation.
+# The default value is: NO.
EXTRACT_PACKAGE = NO
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
EXTRACT_STATIC = NO
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
EXTRACT_LOCAL_CLASSES = NO
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
EXTRACT_LOCAL_METHODS = NO
# If this flag is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
EXTRACT_ANON_NSPACES = NO
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
HIDE_UNDOC_MEMBERS = YES
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
HIDE_UNDOC_CLASSES = YES
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO, these declarations will be
+# included in the documentation.
+# The default value is: NO.
HIDE_FRIEND_COMPOUNDS = YES
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
HIDE_IN_BODY_DOCS = NO
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
INTERNAL_DOCS = NO
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
# allowed. This is useful if you have classes or files whose names only differ
# in case and if your file system supports case sensitive file names. Windows
# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
CASE_SENSE_NAMES = NO
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
HIDE_SCOPE_NAMES = NO
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
SHOW_INCLUDE_FILES = YES
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
FORCE_LOCAL_INCLUDES = NO
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
INLINE_INFO = YES
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
SORT_MEMBER_DOCS = YES
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
SORT_BRIEF_DOCS = NO
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
SORT_MEMBERS_CTORS_1ST = NO
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
SORT_GROUP_NAMES = NO
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
SORT_BY_SCOPE_NAME = NO
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
STRICT_PROTO_MATCHING = NO
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
GENERATE_TODOLIST = YES
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
GENERATE_TESTLIST = YES
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
GENERATE_BUGLIST = YES
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
GENERATE_DEPRECATEDLIST= YES
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if section-label ... \endif
-# and \cond section-label ... \endcond blocks.
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
ENABLED_SECTIONS = LIBAVOID_DOC
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
MAX_INITIALIZER_LINES = 30
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
SHOW_USED_FILES = YES
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
SHOW_FILES = YES
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
SHOW_NAMESPACES = YES
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
# doxygen should invoke to get the current version for each file (typically from
# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
FILE_VERSION_FILTER =
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
# by doxygen. The layout file controls the global structure of the generated
# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
LAYOUT_FILE =
-# The CITE_BIB_FILES tag can be used to specify one or more bib files
-# containing the references data. This must be a list of .bib files. The
-# .bib extension is automatically appended if omitted. Using this command
-# requires the bibtex tool to be installed. See also
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
-# feature you need bibtex and perl available in the search path. Do not use
-# file names with spaces, bibtex cannot handle them.
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
CITE_BIB_FILES =
#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
+# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
QUIET = NO
# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
WARNINGS = YES
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
WARN_IF_UNDOCUMENTED = YES
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
WARN_IF_DOC_ERROR = YES
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
+# The default value is: NO.
WARN_NO_PARAMDOC = NO
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered.
+# The default value is: NO.
+
+WARN_AS_ERROR = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
WARN_FORMAT = "$file:$line: $text"
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
WARN_LOGFILE =
#---------------------------------------------------------------------------
-# configuration options related to the input files
+# Configuration options related to the input files
#---------------------------------------------------------------------------
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
INPUT = . \
doc
# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
INPUT_ENCODING = UTF-8
# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
+# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
FILE_PATTERNS = *.cpp \
*.h \
*.doc
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
RECURSIVE = NO
# The EXCLUDE tag can be used to specify files and/or directories that should be
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
# Note that relative paths are relative to the directory from which doxygen is
# run.
@@ -708,14 +828,16 @@ EXCLUDE =
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
# from the input.
+# The default value is: NO.
EXCLUDE_SYMLINKS = NO
# If the value of the INPUT tag contains directories, you can use the
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
EXCLUDE_PATTERNS =
@@ -724,814 +846,1130 @@ EXCLUDE_PATTERNS =
# output. The symbol name can be a fully qualified name, a word, or if the
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
EXCLUDE_SYMBOLS =
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
EXAMPLE_PATH =
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
EXAMPLE_PATTERNS =
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
EXAMPLE_RECURSIVE = NO
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
IMAGE_PATH =
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
INPUT_FILTER =
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
FILTER_PATTERNS =
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
FILTER_SOURCE_FILES = NO
# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
FILTER_SOURCE_PATTERNS =
-# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page (index.html).
-# This can be useful if you have a project on for instance GitHub and want reuse
-# the introduction page also for the doxygen output.
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
-# configuration options related to source browsing
+# Configuration options related to source browsing
#---------------------------------------------------------------------------
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
SOURCE_BROWSER = NO
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
INLINE_SOURCES = NO
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C, C++ and Fortran comments will always remain visible.
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
STRIP_CODE_COMMENTS = YES
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
REFERENCED_BY_RELATION = NO
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
REFERENCES_RELATION = NO
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
REFERENCES_LINK_SOURCE = YES
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
USE_HTAGS = NO
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
+# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
ALPHABETICAL_INDEX = NO
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
COLS_IN_ALPHA_INDEX = 5
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
IGNORE_PREFIX =
#---------------------------------------------------------------------------
-# configuration options related to the HTML output
+# Configuration options related to the HTML output
#---------------------------------------------------------------------------
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
GENERATE_HTML = YES
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_OUTPUT = html
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FILE_EXTENSION = .html
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-# for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is advised to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER = doc/header.html
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FOOTER =
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If left blank doxygen will
-# generate a default style sheet. Note that it is recommended to use
-# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this
-# tag will in the future become obsolete.
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_STYLESHEET =
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional
-# user-defined cascading style sheet that is included after the standard
-# style sheets created by doxygen. Using this option one can overrule
-# certain style aspects. This is preferred over using HTML_STYLESHEET
-# since it does not replace the standard style sheet and is therefor more
-# robust against future updates. Doxygen will copy the style sheet file to
-# the output directory.
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET =
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that
-# the files will be copied as-is; there are no commands or markers available.
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_FILES =
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the style sheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_HUE = 220
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_SAT = 100
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_GAMMA = 80
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_TIMESTAMP = YES
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_DYNAMIC_SECTIONS = NO
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
-# entries shown in the various tree structured indices initially; the user
-# can expand and collapse entries dynamically later on. Doxygen will expand
-# the tree to such a level that at most the specified number of entries are
-# visible (unless a fully collapsed tree already exceeds this amount).
-# So setting the number of entries 1 will produce a full collapsed tree by
-# default. 0 is a special value representing an infinite number of entries
-# and will result in a full expanded tree by default.
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_INDEX_NUM_ENTRIES = 100
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_DOCSET = NO
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_FEEDNAME = "Doxygen generated docs"
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_BUNDLE_ID = org.doxygen.Project
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely
-# identify the documentation publisher. This should be a reverse domain-name
-# style string, e.g. com.mycompany.MyDocSet.documentation.
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_PUBLISHER_NAME = Publisher
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_HTMLHELP = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_FILE =
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
HHC_LOCATION =
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
GENERATE_CHI = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_INDEX_ENCODING =
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
BINARY_TOC = NO
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
TOC_EXPAND = NO
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_QHP = NO
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QCH_FILE =
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_NAMESPACE =
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_VIRTUAL_FOLDER = doc
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_NAME =
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_SECT_FILTER_ATTRS =
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHG_LOCATION =
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_ECLIPSEHELP = NO
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
ECLIPSE_DOC_ID = org.doxygen.Project
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
-# at top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it. Since the tabs have the same information as the
-# navigation tree you can set this option to NO if you already set
-# GENERATE_TREEVIEW to YES.
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
DISABLE_INDEX = NO
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-# Since the tree basically has the same information as the tab index you
-# could consider to set DISABLE_INDEX to NO when enabling this option.
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_TREEVIEW = NONE
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
ENUM_VALUES_PER_LINE = 4
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
TREEVIEW_WIDTH = 250
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
EXT_LINKS_IN_WINDOW = NO
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
FORMULA_FONTSIZE = 10
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
FORMULA_TRANSPARENT = YES
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you may also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
USE_MATHJAX = NO
# When MathJax is enabled you can set the default output format to be used for
-# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and
-# SVG. The default value is HTML-CSS, which is slower, but has the best
-# compatibility.
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_FORMAT = HTML-CSS
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to
-# the MathJax Content Delivery Network so you can quickly see the result without
-# installing MathJax.
-# However, it is strongly recommended to install a local
-# copy of MathJax from http://www.mathjax.org before deployment.
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
-# names that should be enabled during MathJax rendering.
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_EXTENSIONS =
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
SEARCHENGINE = NO
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript.
-# There are two flavours of web server based search depending on the
-# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
-# searching and an index file used by the script. When EXTERNAL_SEARCH is
-# enabled the indexing and searching needs to be provided by external tools.
-# See the manual for details.
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
SERVER_BASED_SEARCH = NO
-# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
# script for searching. Instead the search results are written to an XML file
# which needs to be processed by an external indexer. Doxygen will invoke an
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain
-# the search results. Doxygen ships with an example indexer (doxyindexer) and
-# search engine (doxysearch.cgi) which are based on the open source search engine
-# library Xapian. See the manual for configuration details.
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
EXTERNAL_SEARCH = NO
# The SEARCHENGINE_URL should point to a search engine hosted by a web server
-# which will returned the search results when EXTERNAL_SEARCH is enabled.
-# Doxygen ships with an example search engine (doxysearch) which is based on
-# the open source search engine library Xapian. See the manual for configuration
-# details.
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
SEARCHENGINE_URL =
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
# search data is written to a file for indexing by an external tool. With the
# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
SEARCHDATA_FILE = searchdata.xml
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through other
-# doxygen projects that are not otherwise connected via tags files, but are
-# all added to the same search index. Each project needs to have a tag file set
-# via GENERATE_TAGFILE. The search mapping then maps the name of the tag file
-# to a relative location where the documentation can be found,
-# similar to the
-# TAGFILES option but without actually processing the tag file.
-# The format is: EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
+# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
GENERATE_LATEX = YES
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_OUTPUT = latex
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_CMD_NAME = latex
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
MAKEINDEX_CMD_NAME = makeindex
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
COMPACT_LATEX = NO
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
PAPER_TYPE = a4wide
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
EXTRA_PACKAGES =
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_HEADER =
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# the last chapter. If it is left blank doxygen will generate a
-# standard footer. Notice: only use this tag if you know what you are doing!
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_FOOTER =
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
PDF_HYPERLINKS = YES
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
USE_PDFLATEX = YES
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_BATCHMODE = NO
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_HIDE_INDICES = NO
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_SOURCE_CODE = NO
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
-# http://en.wikipedia.org/wiki/BibTeX for more info.
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_BIB_STYLE = plain
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP = NO
+
#---------------------------------------------------------------------------
-# configuration options related to the RTF output
+# Configuration options related to the RTF output
#---------------------------------------------------------------------------
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
GENERATE_RTF = NO
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_OUTPUT = rtf
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
COMPACT_RTF = NO
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_HYPERLINKS = NO
-# Load style sheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_STYLESHEET_FILE =
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_EXTENSIONS_FILE =
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE = NO
+
#---------------------------------------------------------------------------
-# configuration options related to the man page output
+# Configuration options related to the man page output
#---------------------------------------------------------------------------
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
GENERATE_MAN = NO
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
MAN_OUTPUT = man
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
MAN_EXTENSION = .3
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
MAN_LINKS = NO
#---------------------------------------------------------------------------
-# configuration options related to the XML output
+# Configuration options related to the XML output
#---------------------------------------------------------------------------
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
GENERATE_XML = NO
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
-XML_SCHEMA =
+XML_PROGRAMLISTING = YES
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
-XML_DTD =
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
+GENERATE_DOCBOOK = NO
-XML_PROGRAMLISTING = YES
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
+# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sf.net) file that captures the
+# structure of the code including all documentation. Note that this feature is
+# still experimental and incomplete at the moment.
+# The default value is: NO.
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
+# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
GENERATE_PERLMOD = NO
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
PERLMOD_LATEX = NO
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
PERLMOD_PRETTY = YES
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
PERLMOD_MAKEVAR_PREFIX =
@@ -1539,106 +1977,129 @@ PERLMOD_MAKEVAR_PREFIX =
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
ENABLE_PREPROCESSING = YES
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
MACRO_EXPANSION = NO
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_ONLY_PREDEF = NO
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
SEARCH_INCLUDES = YES
# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
INCLUDE_PATH =
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
INCLUDE_FILE_PATTERNS =
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED =
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition that
-# overrules the definition found in the source code.
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_AS_DEFINED =
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
-# Configuration::additions related to external references
+# Configuration options related to external references
#---------------------------------------------------------------------------
-# The TAGFILES option can be used to specify one or more tagfiles. For each
-# tag file the location of the external documentation should be added. The
-# format of a tag file without this location is as follows:
-#
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
# TAGFILES = file1 file2 ...
# Adding location for the tag files is done as follows:
-#
# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths
-# or URLs. Note that each tag file must have a unique name (where the name does
-# NOT include the path). If a tag file is not located in the directory in which
-# doxygen is run, you must also specify the path to the tagfile here.
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
TAGFILES =
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
GENERATE_TAGFILE =
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
ALLEXTERNALS = NO
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
EXTERNAL_GROUPS = YES
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
PERL_PATH = /usr/bin/perl
@@ -1646,222 +2107,317 @@ PERL_PATH = /usr/bin/perl
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
CLASS_DIAGRAMS = YES
# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
MSCGEN_PATH =
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH =
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
HIDE_UNDOC_RELATIONS = YES
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
HAVE_DOT = NO
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_NUM_THREADS = 0
-# By default doxygen will use the Helvetica font for all dot files that
-# doxygen generates. When you want a differently looking font you can specify
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find
-# the font, which can be done by putting it in a standard location or by setting
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
-# directory containing the font.
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_FONTNAME = FreeSans
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_FONTSIZE = 10
-# By default doxygen will tell dot to use the Helvetica font.
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
-# set the path where dot can find it.
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_FONTPATH =
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# CLASS_DIAGRAMS tag to NO.
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
CLASS_GRAPH = YES
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
COLLABORATION_GRAPH = YES
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
GROUP_GRAPHS = YES
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
# collaboration diagrams in a style similar to the OMG's Unified Modeling
# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
UML_LOOK = NO
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside
-# the class node. If there are many fields or methods and many nodes the
-# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
-# threshold limits the number of items for each type to make the size more
-# managable. Set this to 0 for no limit. Note that the threshold may be
-# exceeded by 50% before the limit is enforced.
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
UML_LIMIT_NUM_FIELDS = 10
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
TEMPLATE_RELATIONS = NO
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
INCLUDE_GRAPH = YES
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
INCLUDED_BY_GRAPH = YES
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
CALL_GRAPH = NO
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
CALLER_GRAPH = NO
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
GRAPHICAL_HIERARCHY = YES
-# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
DIRECTORY_GRAPH = YES
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used. If you choose svg you need to set
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible in IE 9+ (other browsers do not have this requirement).
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_IMAGE_FORMAT = png
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning.
-# Note that this requires a modern browser other than Internet Explorer.
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible. Older versions of IE do not have SVG support.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
INTERACTIVE_SVG = NO
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_PATH =
# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
DOTFILE_DIRS =
# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
MSCFILE_DIRS =
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+
+PLANTUML_JAR_PATH =
+
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_GRAPH_MAX_NODES = 50
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
MAX_DOT_GRAPH_DEPTH = 0
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_TRANSPARENT = NO
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_MULTI_TARGETS = NO
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
GENERATE_LEGEND = YES
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
diff --git a/src/3rdparty/adaptagrams/libavoid/connectionpin.cpp b/src/3rdparty/adaptagrams/libavoid/connectionpin.cpp
index 5594d807c..3d9ba4679 100644
--- a/src/3rdparty/adaptagrams/libavoid/connectionpin.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/connectionpin.cpp
@@ -40,7 +40,7 @@ ShapeConnectionPin::ShapeConnectionPin(ShapeRef *shape,
const double yPortionOffset, const bool proportional,
const double insideOffset, const ConnDirFlags visDirs)
: m_shape(shape),
- m_junction(NULL),
+ m_junction(nullptr),
m_class_id(classId),
m_x_offset(xPortionOffset),
m_y_offset(yPortionOffset),
@@ -48,7 +48,7 @@ ShapeConnectionPin::ShapeConnectionPin(ShapeRef *shape,
m_visibility_directions(visDirs),
m_exclusive(true),
m_connection_cost(0.0),
- m_vertex(NULL),
+ m_vertex(nullptr),
m_using_proportional_offsets(proportional)
{
commonInitForShapeConnection();
@@ -59,7 +59,7 @@ ShapeConnectionPin::ShapeConnectionPin(ShapeRef *shape,
const double yOffset, const double insideOffset,
const ConnDirFlags visDirs)
: m_shape(shape),
- m_junction(NULL),
+ m_junction(nullptr),
m_class_id(classId),
m_x_offset(xOffset),
m_y_offset(yOffset),
@@ -67,7 +67,7 @@ ShapeConnectionPin::ShapeConnectionPin(ShapeRef *shape,
m_visibility_directions(visDirs),
m_exclusive(true),
m_connection_cost(0.0),
- m_vertex(NULL),
+ m_vertex(nullptr),
m_using_proportional_offsets(true)
{
commonInitForShapeConnection();
@@ -76,7 +76,7 @@ ShapeConnectionPin::ShapeConnectionPin(ShapeRef *shape,
void ShapeConnectionPin::commonInitForShapeConnection(void)
{
- COLA_ASSERT(m_shape != NULL);
+ COLA_ASSERT(m_shape != nullptr);
COLA_ASSERT(m_class_id > 0);
if (m_using_proportional_offsets)
@@ -129,14 +129,14 @@ void ShapeConnectionPin::commonInitForShapeConnection(void)
if (m_router->m_allows_polyline_routing)
{
- vertexVisibility(m_vertex, NULL, true, true);
+ vertexVisibility(m_vertex, nullptr, true, true);
}
}
ShapeConnectionPin::ShapeConnectionPin(JunctionRef *junction,
const unsigned int classId, const ConnDirFlags visDirs)
- : m_shape(NULL),
+ : m_shape(nullptr),
m_junction(junction),
m_class_id(classId),
m_x_offset(0.0),
@@ -145,10 +145,10 @@ ShapeConnectionPin::ShapeConnectionPin(JunctionRef *junction,
m_visibility_directions(visDirs),
m_exclusive(true),
m_connection_cost(0.0),
- m_vertex(NULL),
+ m_vertex(nullptr),
m_using_proportional_offsets(false)
{
- COLA_ASSERT(m_junction != NULL);
+ COLA_ASSERT(m_junction != nullptr);
m_router = m_junction->router();
m_junction->addConnectionPin(this);
@@ -163,7 +163,7 @@ ShapeConnectionPin::ShapeConnectionPin(JunctionRef *junction,
if (m_router->m_allows_polyline_routing)
{
- vertexVisibility(m_vertex, NULL, true, true);
+ vertexVisibility(m_vertex, nullptr, true, true);
}
}
@@ -192,7 +192,7 @@ ShapeConnectionPin::~ShapeConnectionPin()
m_vertex->removeFromGraph();
m_router->vertices.removeVertex(m_vertex);
delete m_vertex;
- m_vertex = NULL;
+ m_vertex = nullptr;
}
}
@@ -208,7 +208,7 @@ void ShapeConnectionPin::updateVisibility(void)
m_vertex->removeFromGraph();
if (m_router->m_allows_polyline_routing)
{
- vertexVisibility(m_vertex, NULL, true, true);
+ vertexVisibility(m_vertex, nullptr, true, true);
}
}
diff --git a/src/3rdparty/adaptagrams/libavoid/connector.cpp b/src/3rdparty/adaptagrams/libavoid/connector.cpp
index de4206e33..24ab289d4 100644
--- a/src/3rdparty/adaptagrams/libavoid/connector.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/connector.cpp
@@ -48,7 +48,7 @@ namespace Avoid {
ConnRef::ConnRef(Router *router, const unsigned int id)
: m_router(router),
m_type(router->validConnType()),
- m_reroute_flag_ptr(NULL),
+ m_reroute_flag_ptr(nullptr),
m_needs_reroute_flag(true),
m_false_path(false),
m_needs_repaint(false),
@@ -56,15 +56,15 @@ ConnRef::ConnRef(Router *router, const unsigned int id)
m_hate_crossings(false),
m_has_fixed_route(false),
m_route_dist(0),
- m_src_vert(NULL),
- m_dst_vert(NULL),
- m_start_vert(NULL),
- m_callback_func(NULL),
- m_connector(NULL),
- m_src_connend(NULL),
- m_dst_connend(NULL)
-{
- COLA_ASSERT(m_router != NULL);
+ m_src_vert(nullptr),
+ m_dst_vert(nullptr),
+ m_start_vert(nullptr),
+ m_callback_func(nullptr),
+ m_connector(nullptr),
+ m_src_connend(nullptr),
+ m_dst_connend(nullptr)
+{
+ COLA_ASSERT(m_router != nullptr);
m_id = m_router->assignId(id);
// TODO: Store endpoints and details.
@@ -78,7 +78,7 @@ ConnRef::ConnRef(Router *router, const ConnEnd& src, const ConnEnd& dst,
const unsigned int id)
: m_router(router),
m_type(router->validConnType()),
- m_reroute_flag_ptr(NULL),
+ m_reroute_flag_ptr(nullptr),
m_needs_reroute_flag(true),
m_false_path(false),
m_needs_repaint(false),
@@ -86,14 +86,14 @@ ConnRef::ConnRef(Router *router, const ConnEnd& src, const ConnEnd& dst,
m_hate_crossings(false),
m_has_fixed_route(false),
m_route_dist(0),
- m_src_vert(NULL),
- m_dst_vert(NULL),
- m_callback_func(NULL),
- m_connector(NULL),
- m_src_connend(NULL),
- m_dst_connend(NULL)
-{
- COLA_ASSERT(m_router != NULL);
+ m_src_vert(nullptr),
+ m_dst_vert(nullptr),
+ m_callback_func(nullptr),
+ m_connector(nullptr),
+ m_src_connend(nullptr),
+ m_dst_connend(nullptr)
+{
+ COLA_ASSERT(m_router != nullptr);
m_id = m_router->assignId(id);
m_route.clear();
@@ -126,14 +126,14 @@ ConnRef::~ConnRef()
m_src_vert->removeFromGraph();
m_router->vertices.removeVertex(m_src_vert);
delete m_src_vert;
- m_src_vert = NULL;
+ m_src_vert = nullptr;
}
if (m_src_connend)
{
m_src_connend->disconnect();
m_src_connend->freeActivePin();
delete m_src_connend;
- m_src_connend = NULL;
+ m_src_connend = nullptr;
}
if (m_dst_vert)
@@ -141,14 +141,14 @@ ConnRef::~ConnRef()
m_dst_vert->removeFromGraph();
m_router->vertices.removeVertex(m_dst_vert);
delete m_dst_vert;
- m_dst_vert = NULL;
+ m_dst_vert = nullptr;
}
if (m_dst_connend)
{
m_dst_connend->disconnect();
m_dst_connend->freeActivePin();
delete m_dst_connend;
- m_dst_connend = NULL;
+ m_dst_connend = nullptr;
}
// Clear checkpoint vertices.
@@ -219,7 +219,7 @@ void ConnRef::setRoutingCheckpoints(const std::vector<Checkpoint>& checkpoints)
{
for (size_t i = 0; i < m_checkpoints.size(); ++i)
{
- vertexVisibility(m_checkpoint_vertices[i], NULL, true, true);
+ vertexVisibility(m_checkpoint_vertices[i], nullptr, true, true);
}
}
}
@@ -235,14 +235,14 @@ void ConnRef::common_updateEndPoint(const unsigned int type, ConnEnd connEnd)
// The connEnd is a copy of a ConnEnd that will get disconnected,
// so don't leave it looking like it is still connected.
- connEnd.m_conn_ref = NULL;
+ connEnd.m_conn_ref = nullptr;
if (!m_active)
{
makeActive();
}
- VertInf *altered = NULL;
+ VertInf *altered = nullptr;
VertIDProps properties = VertID::PROP_ConnPoint;
if (connEnd.isPinConnection())
@@ -267,7 +267,7 @@ void ConnRef::common_updateEndPoint(const unsigned int type, ConnEnd connEnd)
m_src_connend->disconnect();
m_src_connend->freeActivePin();
delete m_src_connend;
- m_src_connend = NULL;
+ m_src_connend = nullptr;
}
if (connEnd.isPinConnection())
{
@@ -297,7 +297,7 @@ void ConnRef::common_updateEndPoint(const unsigned int type, ConnEnd connEnd)
m_dst_connend->disconnect();
m_dst_connend->freeActivePin();
delete m_dst_connend;
- m_dst_connend = NULL;
+ m_dst_connend = nullptr;
}
if (connEnd.isPinConnection())
{
@@ -351,7 +351,7 @@ void ConnRef::setDestEndpoint(const ConnEnd& dstPoint)
bool ConnRef::getConnEndForEndpointVertex(VertInf *vertex,
ConnEnd& connEnd) const
{
- if (vertex == NULL)
+ if (vertex == nullptr)
{
err_printf("Warning: In ConnRef::getConnEndForEndpointVertex():\n"
" ConnEnd for connector %d is uninitialised. It may have been\n"
@@ -494,8 +494,8 @@ void ConnRef::outputCode(FILE *fp) const
std::pair<Obstacle *, Obstacle *> ConnRef::endpointAnchors(void) const
{
std::pair<Obstacle *, Obstacle *> anchors;
- anchors.first = NULL;
- anchors.second = NULL;
+ anchors.first = nullptr;
+ anchors.second = nullptr;
if (m_src_connend)
{
@@ -520,7 +520,7 @@ bool ConnRef::setEndpoint(const unsigned int type, const VertID& pointID,
Point *pointSuggestion)
{
VertInf *vInf = m_router->vertices.getVertexByID(pointID);
- if (vInf == NULL)
+ if (vInf == nullptr)
{
return false;
}
@@ -694,8 +694,8 @@ Point midpoint(Point a, Point b)
std::pair<JunctionRef *, ConnRef *> ConnRef::splitAtSegment(
const size_t segmentN)
{
- ConnRef *newConn = NULL;
- JunctionRef *newJunction = NULL;
+ ConnRef *newConn = nullptr;
+ JunctionRef *newJunction = nullptr;
if (m_display_route.size() > segmentN)
{
@@ -813,17 +813,17 @@ bool validateBendPoint(VertInf *aInf, VertInf *bInf, VertInf *cInf)
}
bool bendOkay = true;
- if ((aInf == NULL) || (cInf == NULL))
+ if ((aInf == nullptr) || (cInf == nullptr))
{
// Not a bendpoint, i.e., the end of the connector, so don't test.
return bendOkay;
}
- COLA_ASSERT(bInf != NULL);
+ COLA_ASSERT(bInf != nullptr);
VertInf *dInf = bInf->shPrev;
VertInf *eInf = bInf->shNext;
- COLA_ASSERT(dInf != NULL);
- COLA_ASSERT(eInf != NULL);
+ COLA_ASSERT(dInf != nullptr);
+ COLA_ASSERT(eInf != nullptr);
Point& a = aInf->point;
Point& b = bInf->point;
@@ -981,7 +981,7 @@ bool ConnRef::generatePath(void)
COLA_ASSERT(vertices.size() >= 2);
COLA_ASSERT(vertices[0] == src());
COLA_ASSERT(vertices[vertices.size() - 1] == dst());
- COLA_ASSERT(m_reroute_flag_ptr != NULL);
+ COLA_ASSERT(m_reroute_flag_ptr != nullptr);
for (size_t i = 1; i < vertices.size(); ++i)
{
@@ -1094,7 +1094,7 @@ void ConnRef::generateCheckpointsPath(std::vector<Point>& path,
AStarPath aStar;
// Route the connector
- aStar.search(this, start, end, NULL);
+ aStar.search(this, start, end, nullptr);
// Restore changes made for checkpoint visibility directions.
if (lastSuccessfulIndex > 0)
@@ -1230,7 +1230,7 @@ void ConnRef::generateStandardPath(std::vector<Point>& path,
#ifdef PATHDEBUG
db_printf("\n\n\nSTART:\n\n");
#endif
- VertInf *prior = NULL;
+ VertInf *prior = nullptr;
for (VertInf *curr = tar; curr != m_start_vert->pathNext;
curr = curr->pathNext)
{
@@ -1275,7 +1275,7 @@ void ConnRef::generateStandardPath(std::vector<Point>& path,
{
// TODO: Could we know this edge already?
//EdgeInf *edge = EdgeInf::existingEdge(m_src_vert, tar);
- //COLA_ASSERT(edge != NULL);
+ //COLA_ASSERT(edge != nullptr);
//edge->addCycleBlocker();
}
}
@@ -1701,9 +1701,9 @@ ConnectorCrossings::ConnectorCrossings(Avoid::Polygon& poly, bool polyIsConn,
checkForBranchingSegments(false),
polyConnRef(polyConnRef),
connConnRef(connConnRef),
- crossingPoints(NULL),
- pointOrders(NULL),
- sharedPaths(NULL)
+ crossingPoints(nullptr),
+ pointOrders(nullptr),
+ sharedPaths(nullptr)
{
}
@@ -1754,7 +1754,7 @@ void ConnectorCrossings::countForSegment(size_t cIndex, const bool finalSegment)
bool connIsOrthogonal = (connConnRef &&
(connConnRef->routingType() == ConnType_Orthogonal));
- // Fixed routes are will not have segment breaks at possible crossings.
+ // Fixed routes will not have segment breaks at possible crossings.
bool polyIsFixed = (polyConnRef && polyConnRef->hasFixedRoute());
bool connIsFixed = (connConnRef && connConnRef->hasFixedRoute());
@@ -1956,11 +1956,11 @@ void ConnectorCrossings::countForSegment(size_t cIndex, const bool finalSegment)
// attached to a junction and it is the same one.
std::pair<ConnEnd, ConnEnd> connEnds =
connConnRef->endpointConnEnds();
- JunctionRef *connJunction = NULL;
+ JunctionRef *connJunction = nullptr;
std::pair<ConnEnd, ConnEnd> polyEnds =
polyConnRef->endpointConnEnds();
- JunctionRef *polyJunction = NULL;
+ JunctionRef *polyJunction = nullptr;
// The front of the c_path corresponds to destination
// of the connector.
diff --git a/src/3rdparty/adaptagrams/libavoid/connector.h b/src/3rdparty/adaptagrams/libavoid/connector.h
index 56f1b0263..74571396e 100644
--- a/src/3rdparty/adaptagrams/libavoid/connector.h
+++ b/src/3rdparty/adaptagrams/libavoid/connector.h
@@ -234,27 +234,26 @@ class AVOID_EXPORT ConnRef
//! false if it does not.
bool needsRepaint(void) const;
- //! @brief Returns a reference to the current route for the connector.
- //!
- //! This is a "raw" version of the route, where each line segment in
- //! the route may be made up of multiple collinear line segments. It
- //! will also not have post-processing (like curved corners) applied
- //! to it. The simplified route for display can be obtained by calling
+ //! @brief Returns a reference to the current raw "debug" route for
+ //! the connector.
+ //!
+ //! This is a raw "debug" shortest path version of the route, where
+ //! each line segment in the route may be made up of multiple collinear
+ //! line segments. It also has no post-processing (i.e., centering,
+ //! nudging apart of overlapping paths, or curving of corners) applied
+ //! to it. A route to display to the user can be obtained by calling
//! displayRoute().
//!
//! @returns The PolyLine route for the connector.
- //! @note You can obtain a modified version of this poly-line
- //! route with curved corners added by calling
- //! PolyLine::curvedPolyline().
const PolyLine& route(void) const;
//! @brief Returns a reference to the current display version of the
//! route for the connector.
//!
//! The display version of a route has been simplified to collapse all
- //! collinear line segments into single segments. It may also have
- //! post-processing applied to the route, such as curved corners or
- //! nudging.
+ //! collinear line segments into single segments. It also has all
+ //! post-processing applied to the route, including centering, curved
+ //! corners and nudging apart of overlapping segments.
//!
//! @returns The PolyLine display route for the connector.
PolyLine& displayRoute(void);
@@ -409,7 +408,7 @@ class AVOID_EXPORT ConnRef
bool doesHateCrossings(void) const;
void setEndpoint(const unsigned int type, const ConnEnd& connEnd);
bool setEndpoint(const unsigned int type, const VertID& pointID,
- Point *pointSuggestion = NULL);
+ Point *pointSuggestion = nullptr);
std::vector<Point> possibleDstPinPoints(void) const;
private:
@@ -514,8 +513,8 @@ class ConnectorCrossings
{
public:
ConnectorCrossings(Avoid::Polygon& poly, bool polyIsConn,
- Avoid::Polygon& conn, ConnRef *polyConnRef = NULL,
- ConnRef *connConnRef = NULL);
+ Avoid::Polygon& conn, ConnRef *polyConnRef = nullptr,
+ ConnRef *connConnRef = nullptr);
void clear(void);
void countForSegment(size_t cIndex, const bool finalSegment);
diff --git a/src/3rdparty/adaptagrams/libavoid/connend.cpp b/src/3rdparty/adaptagrams/libavoid/connend.cpp
index 3929e8d71..7a5f6c19a 100644
--- a/src/3rdparty/adaptagrams/libavoid/connend.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/connend.cpp
@@ -26,6 +26,7 @@
#include <cmath>
#include <cstdlib>
#include <cfloat>
+#include <algorithm>
#include "libavoid/router.h"
#include "libavoid/connend.h"
@@ -45,9 +46,9 @@ ConnEnd::ConnEnd()
m_point(Point(0,0)),
m_directions(ConnDirAll),
m_connection_pin_class_id(CONNECTIONPIN_UNSET),
- m_anchor_obj(NULL),
- m_conn_ref(NULL),
- m_active_pin(NULL)
+ m_anchor_obj(nullptr),
+ m_conn_ref(nullptr),
+ m_active_pin(nullptr)
{
}
@@ -56,9 +57,9 @@ ConnEnd::ConnEnd(const Point& point)
m_point(point),
m_directions(ConnDirAll),
m_connection_pin_class_id(CONNECTIONPIN_UNSET),
- m_anchor_obj(NULL),
- m_conn_ref(NULL),
- m_active_pin(NULL)
+ m_anchor_obj(nullptr),
+ m_conn_ref(nullptr),
+ m_active_pin(nullptr)
{
}
@@ -68,9 +69,9 @@ ConnEnd::ConnEnd(const Point& point, const ConnDirFlags visDirs)
m_point(point),
m_directions(visDirs),
m_connection_pin_class_id(CONNECTIONPIN_UNSET),
- m_anchor_obj(NULL),
- m_conn_ref(NULL),
- m_active_pin(NULL)
+ m_anchor_obj(nullptr),
+ m_conn_ref(nullptr),
+ m_active_pin(nullptr)
{
}
@@ -81,10 +82,10 @@ ConnEnd::ConnEnd(ShapeRef *shapeRef, const unsigned int connectionPinClassID)
m_directions(ConnDirAll),
m_connection_pin_class_id(connectionPinClassID),
m_anchor_obj(shapeRef),
- m_conn_ref(NULL),
- m_active_pin(NULL)
+ m_conn_ref(nullptr),
+ m_active_pin(nullptr)
{
- COLA_ASSERT(m_anchor_obj != NULL);
+ COLA_ASSERT(m_anchor_obj != nullptr);
COLA_ASSERT(m_connection_pin_class_id > 0);
m_point = m_anchor_obj->position();
@@ -97,10 +98,10 @@ ConnEnd::ConnEnd(JunctionRef *junctionRef)
m_directions(ConnDirAll),
m_connection_pin_class_id(CONNECTIONPIN_CENTRE),
m_anchor_obj(junctionRef),
- m_conn_ref(NULL),
- m_active_pin(NULL)
+ m_conn_ref(nullptr),
+ m_active_pin(nullptr)
{
- COLA_ASSERT(m_anchor_obj != NULL);
+ COLA_ASSERT(m_anchor_obj != nullptr);
m_point = m_anchor_obj->position();
}
@@ -172,7 +173,7 @@ bool ConnEnd::isPinConnection(void) const
unsigned int ConnEnd::endpointType(void) const
{
- COLA_ASSERT(m_conn_ref != NULL);
+ COLA_ASSERT(m_conn_ref != nullptr);
return (m_conn_ref->m_dst_connend == this) ? VertID::tar : VertID::src;
}
@@ -180,7 +181,7 @@ unsigned int ConnEnd::endpointType(void) const
// Marks this ConnEnd as using a particular ShapeConnectionPin.
void ConnEnd::usePin(ShapeConnectionPin *pin)
{
- COLA_ASSERT(m_active_pin == NULL);
+ COLA_ASSERT(m_active_pin == nullptr);
m_active_pin = pin;
if (m_active_pin)
@@ -193,7 +194,7 @@ void ConnEnd::usePin(ShapeConnectionPin *pin)
// Marks this ConnEnd as using a particular ShapeConnectionPin's vertex.
void ConnEnd::usePinVertex(VertInf *pinVert)
{
- COLA_ASSERT(m_active_pin == NULL);
+ COLA_ASSERT(m_active_pin == nullptr);
for (ShapeConnectionPinSet::iterator curr =
m_anchor_obj->m_connection_pins.begin();
@@ -228,7 +229,7 @@ void ConnEnd::freeActivePin(void)
{
m_active_pin->m_connend_users.erase(this);
}
- m_active_pin = NULL;
+ m_active_pin = nullptr;
}
@@ -237,7 +238,7 @@ void ConnEnd::connect(ConnRef *conn)
{
COLA_ASSERT(isPinConnection());
COLA_ASSERT(m_anchor_obj);
- COLA_ASSERT(m_conn_ref == NULL);
+ COLA_ASSERT(m_conn_ref == nullptr);
m_anchor_obj->addFollowingConnEnd(this);
m_conn_ref = conn;
@@ -247,7 +248,7 @@ void ConnEnd::connect(ConnRef *conn)
// Removes the connection between a connector and a shape/junction.
void ConnEnd::disconnect(const bool shapeDeleted)
{
- if (m_conn_ref == NULL)
+ if (m_conn_ref == nullptr)
{
// Not connected.
return;
@@ -255,13 +256,13 @@ void ConnEnd::disconnect(const bool shapeDeleted)
m_point = position();
m_anchor_obj->removeFollowingConnEnd(this);
- m_conn_ref = NULL;
+ m_conn_ref = nullptr;
if (shapeDeleted)
{
// Turn this into a manual ConnEnd.
m_point = position();
- m_anchor_obj = NULL;
+ m_anchor_obj = nullptr;
m_type = ConnEndPoint;
m_connection_pin_class_id = CONNECTIONPIN_UNSET;
}
@@ -372,7 +373,7 @@ void ConnEnd::assignPinVisibilityTo(VertInf *dummyConnectionVert,
std::pair<bool, VertInf *> ConnEnd::getHyperedgeVertex(Router *router) const
{
bool addedVertex = false;
- VertInf *vertex = NULL;
+ VertInf *vertex = nullptr;
if (m_anchor_obj)
{
@@ -387,7 +388,7 @@ std::pair<bool, VertInf *> ConnEnd::getHyperedgeVertex(Router *router) const
vertex = currPin->m_vertex;
}
}
- COLA_ASSERT(vertex != NULL);
+ COLA_ASSERT(vertex != nullptr);
}
else
{
@@ -399,7 +400,7 @@ std::pair<bool, VertInf *> ConnEnd::getHyperedgeVertex(Router *router) const
if (router->m_allows_polyline_routing)
{
- vertexVisibility(vertex, NULL, true, true);
+ vertexVisibility(vertex, nullptr, true, true);
}
}
diff --git a/src/3rdparty/adaptagrams/libavoid/connend.h b/src/3rdparty/adaptagrams/libavoid/connend.h
index 3288fa14d..74f8cbc3a 100644
--- a/src/3rdparty/adaptagrams/libavoid/connend.h
+++ b/src/3rdparty/adaptagrams/libavoid/connend.h
@@ -193,20 +193,20 @@ class AVOID_EXPORT ConnEnd
//!
ConnDirFlags directions(void) const;
- //! @brief Returns the shape this ConnEnd attaches to, or NULL.
+ //! @brief Returns the shape this ConnEnd attaches to, or nullptr.
//!
//! Will be valid only if type() == ConnEndShapePin.
//!
- //! @return The ShapeRef pointer that the ConnEnd attaches to, or NULL.
+ //! @return The ShapeRef pointer that the ConnEnd attaches to, or nullptr.
//!
ShapeRef *shape(void) const;
- //! @brief Returns the junction this ConnEnd attaches to, or NULL.
+ //! @brief Returns the junction this ConnEnd attaches to, or nullptr.
//!
//! Will be valid only if type() == ConnEndJunction.
//!
//! @return The JunctionRef pointer that the ConnEnd attaches to,
- //! or NULL.
+ //! or nullptr.
//!
JunctionRef *junction(void) const;
diff --git a/src/3rdparty/adaptagrams/libavoid/doc/description.doc b/src/3rdparty/adaptagrams/libavoid/doc/description.doc
index 6ada6e4ee..8a3655fff 100644
--- a/src/3rdparty/adaptagrams/libavoid/doc/description.doc
+++ b/src/3rdparty/adaptagrams/libavoid/doc/description.doc
@@ -16,7 +16,7 @@ libavoid is part of the
<a href="http://www.adaptagrams.org/">Adaptagrams project</a>.
There are no official releases yet, though the code is stable and
available from the Adaptagrams
-<a href="https://github.com/mjwybrow/adaptagrams">github
+<a href="https://github.com/mjwybrow/adaptagrams">GitHub
repository</a>.
The API is documented using Doxygen. The documentation you are currently
@@ -25,8 +25,8 @@ There is also
a simple <a href="libavoid_example.html">documented example</a> to help you get started.
libavoid is written and maintained by
-<a href="http://marvl.infotech.monash.edu/~mwybrow/">Michael Wybrow</a>,
-a member of <a href="http://marvl.infotech.monash.edu/">MArVL: the Monash Adaptive Visualisation Lab</a> at Monash University, Australia.
+<a href="http://users.monash.edu/~mwybrow/">Michael Wybrow</a>,
+a member of <a href="http://ialab.it.monash.edu/">Immersive Analytics Lab</a> at Monash University, Australia.
The algorithms used for the connector routing are described in the following papers. If you use libavoid, please cite the relevant paper.
- M. Wybrow, K. Marriott, and P.J. Stuckey. Orthogonal connector
@@ -35,28 +35,28 @@ The algorithms used for the connector routing are described in the following pap
(GD '09),\n
LNCS 5849, pages 219–231. Spring-Verlag, 2010.
[<a href="http://dx.doi.org/10.1007/978-3-642-11805-0_22">DOI</a>]
- [<a href="http://marvl.infotech.monash.edu/~mwybrow/papers/wybrow-gd-2009.pdf">PDF</a>]
+ [<a href="http://users.monash.edu/~mwybrow/papers/wybrow-gd-2009.pdf">PDF</a>]
- M. Wybrow, K. Marriott, and P.J. Stuckey. Incremental connector
routing.\n
In Proceedings of 13th International Symposium on Graph Drawing
(GD '05),\n
LNCS 3843, pages 446—457. Springer-Verlag, 2006.
[<a href="http://dx.doi.org/10.1007/11618058_40">DOI</a>]
- [<a href="http://marvl.infotech.monash.edu/~mwybrow/papers/wybrow-gd-2005.pdf">PDF</a>]
+ [<a href="http://users.monash.edu/~mwybrow/papers/wybrow-gd-2005.pdf">PDF</a>]
- M. Wybrow, K. Marriott and P.J. Stuckey. Orthogonal hyperedge routing.\n
In Proceedings of 7th International Conference on the Theory and Application of Diagrams (Diagrams 2012),\n
LNCS (LNAI) 7352, pages 51&ndash;64. Springer-Verlag, 2012.
[<a href="http://dx.doi.org/10.1007/978-3-642-31223-6_10">DOI</a>]
- [<a href="http://marvl.infotech.monash.edu/~mwybrow/papers/wybrow-diagrams-2012.pdf">PDF</a>]
+ [<a href="http://users.monash.edu/~mwybrow/papers/wybrow-diagrams-2012.pdf">PDF</a>]
- K. Marriott, P.J. Stuckey, and M. Wybrow. Seeing Around Corners: Fast Orthogonal Connector Routing.\n
In Proceedings of the 8th International Conference on the Theory and Application of Diagrams (Diagrams 2014),\n
LNCS 8578, pages 31&ndash;37. Springer-Verlag, 2014.
[<a href="http://doi.acm.org/10.1007/978-3-662-44043-8_4">DOI</a>]
- [<a href="http://marvl.infotech.monash.edu/~mwybrow/papers/marriott-diagrams-2014.pdf">PDF</a>]
+ [<a href="http://users.monash.edu/~mwybrow/papers/marriott-diagrams-2014.pdf">PDF</a>]
libavoid is currently used in the following software:
- A commercial circuit diagram editor;
-- <a href="http://www.dunnart.org/">Dunnart</a>, a prototype research
+- <a href="http://users.monash.edu/~mwybrow/dunnart/">Dunnart</a>, a prototype research
constraint-based diagram editor;
- <a href="http://www.inkscape.org/">Inkscape</a>, the popular Open
Source vector graphics editor;
diff --git a/src/3rdparty/adaptagrams/libavoid/geomtypes.cpp b/src/3rdparty/adaptagrams/libavoid/geomtypes.cpp
index c82d1badc..4987834ca 100644
--- a/src/3rdparty/adaptagrams/libavoid/geomtypes.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/geomtypes.cpp
@@ -26,6 +26,7 @@
#include <cmath>
#include <cfloat>
#include <cstdlib>
+#include <algorithm>
#include "libavoid/geomtypes.h"
#include "libavoid/shape.h"
@@ -125,19 +126,19 @@ ReferencingPolygon::ReferencingPolygon(const Polygon& poly, const Router *router
psRef(poly.size()),
psPoints(poly.size())
{
- COLA_ASSERT(router != NULL);
+ COLA_ASSERT(router != nullptr);
for (size_t i = 0; i < poly.size(); ++i)
{
if (poly.ps[i].id == 0)
{
// Can't be referenced, so just make a copy of the point.
- psRef[i] = std::make_pair((Polygon *) NULL,
+ psRef[i] = std::make_pair((Polygon *) nullptr,
kUnassignedVertexNumber);
psPoints[i] = poly.ps[i];
}
else
{
- const Polygon *polyPtr = NULL;
+ const Polygon *polyPtr = nullptr;
for (ObstacleList::const_iterator sh = router->m_obstacles.begin();
sh != router->m_obstacles.end(); ++sh)
{
@@ -148,7 +149,7 @@ ReferencingPolygon::ReferencingPolygon(const Polygon& poly, const Router *router
break;
}
}
- COLA_ASSERT(polyPtr != NULL);
+ COLA_ASSERT(polyPtr != nullptr);
psRef[i] = std::make_pair(polyPtr, poly.ps[i].vn);
}
}
@@ -191,7 +192,7 @@ const Point& ReferencingPolygon::at(size_t index) const
{
COLA_ASSERT(index < size());
- if (psRef[index].first != NULL)
+ if (psRef[index].first != nullptr)
{
const Polygon& poly = *(psRef[index].first);
unsigned short poly_index = psRef[index].second;
diff --git a/src/3rdparty/adaptagrams/libavoid/graph.cpp b/src/3rdparty/adaptagrams/libavoid/graph.cpp
index 280a347fa..5169ddb00 100644
--- a/src/3rdparty/adaptagrams/libavoid/graph.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/graph.cpp
@@ -41,9 +41,9 @@ namespace Avoid {
EdgeInf::EdgeInf(VertInf *v1, VertInf *v2, const bool orthogonal)
- : lstPrev(NULL),
- lstNext(NULL),
- m_router(NULL),
+ : lstPrev(nullptr),
+ lstNext(nullptr),
+ m_router(nullptr),
m_blocker(0),
m_added(false),
m_visible(false),
@@ -54,7 +54,7 @@ EdgeInf::EdgeInf(VertInf *v1, VertInf *v2, const bool orthogonal)
m_vert2(v2),
m_dist(-1)
{
- // Not passed NULL values.
+ // Not passed nullptr values.
COLA_ASSERT(v1 && v2);
// We are in the same instance
@@ -139,7 +139,7 @@ bool EdgeInf::rotationLessThan(const VertInf *lastV, const EdgeInf *rhs) const
// Effectively the same visibility edge, so they are equal.
return false;
}
- VertInf *lhsV = NULL, *rhsV = NULL, *commonV = NULL;
+ VertInf *lhsV = nullptr, *rhsV = nullptr, *commonV = nullptr;
// Determine common Point and the comparison point on the left- and
// the right-hand-side.
@@ -591,17 +591,17 @@ EdgeInf *EdgeInf::checkEdgeVisibility(VertInf *i, VertInf *j, bool knownNew)
COLA_ASSERT(j->id != dummyOrthogID);
Router *router = i->_router;
- EdgeInf *edge = NULL;
+ EdgeInf *edge = nullptr;
if (knownNew)
{
- COLA_ASSERT(existingEdge(i, j) == NULL);
+ COLA_ASSERT(existingEdge(i, j) == nullptr);
edge = new EdgeInf(i, j);
}
else
{
edge = existingEdge(i, j);
- if (edge == NULL)
+ if (edge == nullptr)
{
edge = new EdgeInf(i, j);
}
@@ -610,7 +610,7 @@ EdgeInf *EdgeInf::checkEdgeVisibility(VertInf *i, VertInf *j, bool knownNew)
if (!(edge->m_added) && !(router->InvisibilityGrph))
{
delete edge;
- edge = NULL;
+ edge = nullptr;
}
return edge;
@@ -621,7 +621,7 @@ EdgeInf *EdgeInf::checkEdgeVisibility(VertInf *i, VertInf *j, bool knownNew)
// required.
EdgeInf *EdgeInf::existingEdge(VertInf *i, VertInf *j)
{
- VertInf *selected = NULL;
+ VertInf *selected = nullptr;
// Look through poly-line visibility edges.
selected = (i->visListSize <= j->visListSize) ? i : j;
@@ -662,7 +662,7 @@ EdgeInf *EdgeInf::existingEdge(VertInf *i, VertInf *j)
}
}
- return NULL;
+ return nullptr;
}
@@ -671,8 +671,8 @@ EdgeInf *EdgeInf::existingEdge(VertInf *i, VertInf *j)
EdgeList::EdgeList(bool orthogonal)
: m_orthogonal(orthogonal),
- m_first_edge(NULL),
- m_last_edge(NULL),
+ m_first_edge(nullptr),
+ m_last_edge(nullptr),
m_count(0)
{
}
@@ -694,7 +694,7 @@ void EdgeList::clear(void)
delete m_first_edge;
}
COLA_ASSERT(m_count == 0);
- m_last_edge = NULL;
+ m_last_edge = nullptr;
}
@@ -712,26 +712,26 @@ void EdgeList::addEdge(EdgeInf *edge)
COLA_ASSERT(!m_orthogonal || edge->isOrthogonal() ||
edge->isDummyConnection());
- if (m_first_edge == NULL)
+ if (m_first_edge == nullptr)
{
- COLA_ASSERT(m_last_edge == NULL);
+ COLA_ASSERT(m_last_edge == nullptr);
m_last_edge = edge;
m_first_edge = edge;
- edge->lstPrev = NULL;
- edge->lstNext = NULL;
+ edge->lstPrev = nullptr;
+ edge->lstNext = nullptr;
}
else
{
- COLA_ASSERT(m_last_edge != NULL);
+ COLA_ASSERT(m_last_edge != nullptr);
m_last_edge->lstNext = edge;
edge->lstPrev = m_last_edge;
m_last_edge = edge;
- edge->lstNext = NULL;
+ edge->lstNext = nullptr;
}
m_count++;
}
@@ -752,7 +752,7 @@ void EdgeList::removeEdge(EdgeInf *edge)
m_last_edge = edge->lstPrev;
if (edge == m_first_edge)
{
- m_first_edge = NULL;
+ m_first_edge = nullptr;
}
}
else if (edge == m_first_edge)
@@ -761,8 +761,8 @@ void EdgeList::removeEdge(EdgeInf *edge)
}
- edge->lstPrev = NULL;
- edge->lstNext = NULL;
+ edge->lstPrev = nullptr;
+ edge->lstNext = nullptr;
m_count--;
}
@@ -776,7 +776,7 @@ EdgeInf *EdgeList::begin(void)
EdgeInf *EdgeList::end(void)
{
- return NULL;
+ return nullptr;
}
diff --git a/src/3rdparty/adaptagrams/libavoid/hyperedge.cpp b/src/3rdparty/adaptagrams/libavoid/hyperedge.cpp
index 87a0fbf79..d6f2a40e3 100644
--- a/src/3rdparty/adaptagrams/libavoid/hyperedge.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/hyperedge.cpp
@@ -39,7 +39,7 @@
namespace Avoid {
HyperedgeRerouter::HyperedgeRerouter()
- : m_router(NULL)
+ : m_router(nullptr)
{
}
@@ -52,7 +52,7 @@ size_t HyperedgeRerouter::registerHyperedgeForRerouting(
ConnEndList terminals)
{
m_terminals_vector.push_back(terminals);
- m_root_junction_vector.push_back(NULL);
+ m_root_junction_vector.push_back(nullptr);
return m_terminals_vector.size() - 1;
}
@@ -199,7 +199,7 @@ bool HyperedgeRerouter::findAttachedObjects(size_t index,
continue;
}
- COLA_ASSERT(*curr != NULL);
+ COLA_ASSERT(*curr != nullptr);
validHyperedge |= findAttachedObjects(index, (*curr), junction, hyperedgeConns);
}
return validHyperedge;
@@ -211,7 +211,7 @@ bool HyperedgeRerouter::findAttachedObjects(size_t index,
// connectors so they can be ignored for individual rerouting.
ConnRefSet HyperedgeRerouter::calcHyperedgeConnectors(void)
{
- COLA_ASSERT(m_router != NULL);
+ COLA_ASSERT(m_router != nullptr);
ConnRefSet allRegisteredHyperedgeConns;
@@ -232,7 +232,7 @@ ConnRefSet HyperedgeRerouter::calcHyperedgeConnectors(void)
if (m_root_junction_vector[i])
{
// Follow objects attached to junction to find the hyperedge.
- bool valid = findAttachedObjects(i, m_root_junction_vector[i], NULL,
+ bool valid = findAttachedObjects(i, m_root_junction_vector[i], nullptr,
allRegisteredHyperedgeConns);
if (!valid)
{
@@ -257,7 +257,7 @@ ConnRefSet HyperedgeRerouter::calcHyperedgeConnectors(void)
it != m_terminals_vector[i].end(); ++it)
{
maybeNewVertex = it->getHyperedgeVertex(m_router);
- COLA_ASSERT(maybeNewVertex.second != NULL);
+ COLA_ASSERT(maybeNewVertex.second != nullptr);
m_terminal_vertices_vector[i].insert(maybeNewVertex.second);
if (maybeNewVertex.first)
@@ -276,7 +276,7 @@ ConnRefSet HyperedgeRerouter::calcHyperedgeConnectors(void)
void HyperedgeRerouter::performRerouting(void)
{
- COLA_ASSERT(m_router != NULL);
+ COLA_ASSERT(m_router != nullptr);
m_new_junctions_vector.clear();
m_new_junctions_vector.resize(count());
@@ -334,18 +334,18 @@ void HyperedgeRerouter::performRerouting(void)
// Fill in connector information and join them to junctions of endpoints
// of original connectors.
- treeRoot->addConns(NULL, m_router,
- m_deleted_connectors_vector[i], NULL);
+ treeRoot->addConns(nullptr, m_router,
+ m_deleted_connectors_vector[i], nullptr);
// Output the list of new junctions and connectors from hyperedge tree.
- treeRoot->listJunctionsAndConnectors(NULL, m_new_junctions_vector[i],
+ treeRoot->listJunctionsAndConnectors(nullptr, m_new_junctions_vector[i],
m_new_connectors_vector[i]);
// Write paths from the hyperedge tree back into individual
// connector routes.
for (size_t pass = 0; pass < 2; ++pass)
{
- treeRoot->writeEdgesToConns(NULL, pass);
+ treeRoot->writeEdgesToConns(nullptr, pass);
}
// Tell the router that we are deleting the objects used for the
diff --git a/src/3rdparty/adaptagrams/libavoid/hyperedgeimprover.cpp b/src/3rdparty/adaptagrams/libavoid/hyperedgeimprover.cpp
index 62d026093..bf7c357c2 100644
--- a/src/3rdparty/adaptagrams/libavoid/hyperedgeimprover.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/hyperedgeimprover.cpp
@@ -12,17 +12,19 @@
* See the file LICENSE.LGPL distributed with the library.
*
* Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
+ * accordance with the commercial license agreement provided with the
* library.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Author(s): Michael Wybrow
*/
#include <algorithm>
+#include <sstream>
+#include <iomanip>
#include "libavoid/router.h"
#include "libavoid/shape.h"
@@ -39,7 +41,7 @@ namespace Avoid {
class HyperedgeShiftSegment : public ShiftSegment
{
public:
- HyperedgeShiftSegment(HyperedgeTreeNode *n1, HyperedgeTreeNode *n2,
+ HyperedgeShiftSegment(HyperedgeTreeNode *n1, HyperedgeTreeNode *n2,
const size_t dim, bool immovable)
: ShiftSegment(dim),
nodes((dim + 1) % 2),
@@ -61,7 +63,7 @@ class HyperedgeShiftSegment : public ShiftSegment
for (OrderedHENodeSet::const_iterator curr = nodes.begin();
curr != nodes.end(); ++curr)
{
- (*curr)->shiftSegmentNodeSet = NULL;
+ (*curr)->shiftSegmentNodeSet = nullptr;
}
}
@@ -69,7 +71,7 @@ class HyperedgeShiftSegment : public ShiftSegment
{
return (*nodes.begin())->point;
}
- Point& highPoint(void)
+ Point& highPoint(void)
{
return (*nodes.rbegin())->point;
}
@@ -141,10 +143,10 @@ class HyperedgeShiftSegment : public ShiftSegment
minSpaceLimit : maxSpaceLimit;
if (lowPoint()[dimension] == newPos)
{
- // If aren't actually moving this segment, then mark it
+ // If aren't actually moving this segment, then mark it
// as at-limit.
- // XXX This seems to be because of a segment with an
- // incorrectly marked limit, possibly due to a
+ // XXX This seems to be because of a segment with an
+ // incorrectly marked limit, possibly due to a
// junction positioned within a shape.
m_at_limit = true;
}
@@ -263,7 +265,7 @@ static bool CmpHyperedgeSegmentDirOrder(const ShiftSegment *lhsSuper,
// Constructor.
HyperedgeImprover::HyperedgeImprover()
- : m_router(NULL)
+ : m_router(nullptr)
{
clear();
}
@@ -289,7 +291,7 @@ void HyperedgeImprover::clear(void)
// Helper method for buildHyperedgeSegments() for hyperedge tree nodes.
void HyperedgeImprover::createShiftSegmentsForDimensionExcluding(
- HyperedgeTreeNode *node, const size_t dim, HyperedgeTreeEdge *ignore,
+ HyperedgeTreeNode *node, const size_t dim, HyperedgeTreeEdge *ignore,
ShiftSegmentList& segments)
{
for (std::list<HyperedgeTreeEdge *>::iterator curr = node->edges.begin();
@@ -306,12 +308,12 @@ void HyperedgeImprover::createShiftSegmentsForDimensionExcluding(
// Helper method for buildHyperedgeSegments() for hyperedge tree edges.
void HyperedgeImprover::createShiftSegmentsForDimensionExcluding(
- HyperedgeTreeEdge *edge, const size_t dim, HyperedgeTreeNode *ignore,
+ HyperedgeTreeEdge *edge, const size_t dim, HyperedgeTreeNode *ignore,
ShiftSegmentList& segments)
{
if (edge->hasOrientation(dim) && ! edge->zeroLength())
{
- bool immovable = (edge->ends.first->isImmovable() ||
+ bool immovable = (edge->ends.first->isImmovable() ||
edge->ends.second->isImmovable());
HyperedgeShiftSegment *newSegment =
@@ -377,15 +379,15 @@ void HyperedgeImprover::buildHyperedgeSegments(const size_t dim)
curr != m_hyperedge_tree_roots.end(); ++curr)
{
ShiftSegmentList& segments = m_root_shift_segments[*curr];
-
+
HyperedgeTreeNode *node = m_hyperedge_tree_junctions[*curr];
- createShiftSegmentsForDimensionExcluding(node, dim, NULL, segments);
+ createShiftSegmentsForDimensionExcluding(node, dim, nullptr, segments);
// Merge overlapping segment.
mergeOverlappingSegments(segments);
- m_all_shift_segments.insert(m_all_shift_segments.begin(),
- segments.begin(), segments.end());
+ m_all_shift_segments.insert(m_all_shift_segments.begin(),
+ segments.begin(), segments.end());
}
}
@@ -400,7 +402,7 @@ void HyperedgeImprover::removeZeroLengthEdges(void)
{
HyperedgeTreeNode *node = m_hyperedge_tree_junctions[*curr];
- removeZeroLengthEdges(node, NULL);
+ removeZeroLengthEdges(node, nullptr);
}
}
@@ -410,8 +412,8 @@ void HyperedgeImprover::removeZeroLengthEdges(void)
// edge.
void HyperedgeImprover::moveJunctionsAlongCommonEdges(void)
{
- for (JunctionHyperedgeTreeNodeMap::iterator curr =
- m_hyperedge_tree_junctions.begin();
+ for (JunctionHyperedgeTreeNodeMap::iterator curr =
+ m_hyperedge_tree_junctions.begin();
curr != m_hyperedge_tree_junctions.end(); )
{
HyperedgeTreeNode *node = curr->second;
@@ -430,7 +432,7 @@ void HyperedgeImprover::moveJunctionsAlongCommonEdges(void)
if (nodeMapHasChanged)
{
- // Objects have been added to m_hyperedge_tree_junctions and
+ // Objects have been added to m_hyperedge_tree_junctions and
// this may be earlier than our current iterator, so restart.
curr = m_hyperedge_tree_junctions.begin();
}
@@ -443,7 +445,7 @@ void HyperedgeImprover::moveJunctionsAlongCommonEdges(void)
// This method traverses the hyperedge tree removing zero length edges.
//
-void HyperedgeImprover::removeZeroLengthEdges(HyperedgeTreeEdge *self,
+void HyperedgeImprover::removeZeroLengthEdges(HyperedgeTreeEdge *self,
HyperedgeTreeNode *ignored)
{
if (self->ends.first != ignored)
@@ -460,7 +462,7 @@ void HyperedgeImprover::removeZeroLengthEdges(HyperedgeTreeEdge *self,
// This method traverses the hyperedge tree removing zero length edges.
//
-void HyperedgeImprover::removeZeroLengthEdges(HyperedgeTreeNode *self,
+void HyperedgeImprover::removeZeroLengthEdges(HyperedgeTreeNode *self,
HyperedgeTreeEdge *ignored)
{
for (std::list<HyperedgeTreeEdge *>::iterator curr = self->edges.begin();
@@ -472,8 +474,8 @@ void HyperedgeImprover::removeZeroLengthEdges(HyperedgeTreeNode *self,
if (!edge->hasFixedRoute && edge->zeroLength())
{
HyperedgeTreeNode *other = edge->followFrom(self);
- HyperedgeTreeNode *target = NULL;
- HyperedgeTreeNode *source = NULL;
+ HyperedgeTreeNode *target = nullptr;
+ HyperedgeTreeNode *source = nullptr;
if (other->junction && ! self->junction)
{
target = other;
@@ -489,21 +491,21 @@ void HyperedgeImprover::removeZeroLengthEdges(HyperedgeTreeNode *self,
target = self;
source = other;
}
- else if ( other->junction && self->junction &&
+ else if ( other->junction && self->junction &&
m_can_make_major_changes)
{
// Only delete junctions if we can make major changes.
#ifdef MAJOR_HYPEREDGE_IMPROVEMENT_DEBUG
fprintf(stderr, "HyperedgeImprover: Coalescing junctions "
- "%u and %u:\n", self->junction->id(),
+ "%u and %u:\n", self->junction->id(),
other->junction->id());
fprintf(stderr, " Deleted junction %u\n",
other->junction->id());
fprintf(stderr, " Deleted connector %u\n",
edge->conn->id());
#endif
-
+
// Delete one of the junctions.
m_deleted_junctions.push_back(other->junction);
m_hyperedge_tree_junctions.erase(other->junction);
@@ -517,11 +519,11 @@ void HyperedgeImprover::removeZeroLengthEdges(HyperedgeTreeNode *self,
COLA_ASSERT(m_hyperedge_tree_junctions.
count(self->junction) == 1);
}
- other->junction = NULL;
+ other->junction = nullptr;
// Delete the connector on the zero length edge.
m_deleted_connectors.push_back(edge->conn);
- edge->conn = NULL;
+ edge->conn = nullptr;
target = self;
source = other;
@@ -550,7 +552,7 @@ void HyperedgeImprover::removeZeroLengthEdges(HyperedgeTreeNode *self,
// with limits and balance values precomputed, this method shifts and
// merges segments to improve the overall cost (length + bend penalties)
// for the hyperedge.
-void HyperedgeImprover::nudgeHyperedgeSegments(size_t dimension,
+void HyperedgeImprover::nudgeHyperedgeSegments(size_t dimension,
unsigned int& versionNumber)
{
// For each hyperedge...
@@ -625,7 +627,7 @@ void HyperedgeImprover::writeHyperedgeSegmentsBackToConnPaths(void)
{
HyperedgeTreeNode *node = m_hyperedge_tree_junctions[*curr];
- node->writeEdgesToConns(NULL, pass);
+ node->writeEdgesToConns(nullptr, pass);
}
}
}
@@ -642,9 +644,9 @@ void HyperedgeImprover::outputHyperedgesToSVG(unsigned int pass,
// Reasonable initial limit for diagram bounds.
const double LIMIT = 100000000;
- char filename[50];
- sprintf(filename, "DEBUG/hyperedges-%05u.svg", pass);
- FILE *fp = fopen(filename, "w");
+ std::stringstream filename;
+ filename << "DEBUG/hyperedges-" << std::setfill('0') << std::setw(5) << pass << ".svg";
+ FILE *fp = fopen(filename.str().c_str(), "w");
double minX = LIMIT;
double minY = LIMIT;
@@ -689,7 +691,7 @@ void HyperedgeImprover::outputHyperedgesToSVG(unsigned int pass,
while (obstacleIt != m_router->m_obstacles.end())
{
Obstacle *obstacle = *obstacleIt;
- bool isShape = (NULL != dynamic_cast<ShapeRef *> (obstacle));
+ bool isShape = (nullptr != dynamic_cast<ShapeRef *> (obstacle));
if ( ! isShape )
{
@@ -727,7 +729,7 @@ void HyperedgeImprover::outputHyperedgesToSVG(unsigned int pass,
{
HyperedgeTreeNode *node = m_hyperedge_tree_junctions[*curr];
- node->outputEdgesExcept(fp, NULL);
+ node->outputEdgesExcept(fp, nullptr);
}
fprintf(fp, "</g>\n");
fprintf(fp, "</svg>\n");
@@ -746,7 +748,7 @@ void HyperedgeImprover::getEndpoints(JunctionRef *junction, JunctionRef *ignore,
curr != junction->m_following_conns.end(); ++curr)
{
ConnEnd *connEnd = *curr;
- COLA_ASSERT(connEnd->m_conn_ref != NULL);
+ COLA_ASSERT(connEnd->m_conn_ref != nullptr);
ConnRef *connRef = connEnd->m_conn_ref;
std::pair<Obstacle *, Obstacle *> anchors =
connRef->endpointAnchors();
@@ -791,8 +793,8 @@ void HyperedgeImprover::execute(bool canMakeMajorChanges)
while (connRefIt != m_router->connRefs.end())
{
ConnRef *connRef = *connRefIt;
- JunctionRef *jFront = NULL;
- JunctionRef *jBack = NULL;
+ JunctionRef *jFront = nullptr;
+ JunctionRef *jBack = nullptr;
if (connRef->m_src_connend)
{
@@ -810,13 +812,13 @@ void HyperedgeImprover::execute(bool canMakeMajorChanges)
continue;
}
- bool seenFront = (m_hyperedge_tree_junctions.find(jFront) !=
+ bool seenFront = (m_hyperedge_tree_junctions.find(jFront) !=
m_hyperedge_tree_junctions.end());
bool seenBack = (m_hyperedge_tree_junctions.find(jBack) !=
m_hyperedge_tree_junctions.end());
-
- HyperedgeTreeNode *nodeFront = NULL;
- HyperedgeTreeNode *nodeBack = NULL;
+
+ HyperedgeTreeNode *nodeFront = nullptr;
+ HyperedgeTreeNode *nodeBack = nullptr;
if (jFront)
{
@@ -859,7 +861,7 @@ void HyperedgeImprover::execute(bool canMakeMajorChanges)
}
PolyLine& route = connRef->displayRoute();
- HyperedgeTreeNode *prev = NULL;
+ HyperedgeTreeNode *prev = nullptr;
for (unsigned int i = 1; i < route.size(); ++i)
{
HyperedgeTreeNode *node;
@@ -885,19 +887,19 @@ void HyperedgeImprover::execute(bool canMakeMajorChanges)
}
// Make a list that contains a single junction from each tree.
- for (JunctionHyperedgeTreeNodeMap::iterator curr =
- m_hyperedge_tree_junctions.begin();
+ for (JunctionHyperedgeTreeNodeMap::iterator curr =
+ m_hyperedge_tree_junctions.begin();
curr != m_hyperedge_tree_junctions.end(); ++curr)
{
HyperedgeTreeNode *node = curr->second;
- m_hyperedge_tree_roots.insert(node->junction);
+ m_hyperedge_tree_roots.insert(node->junction);
}
JunctionRefList cyclicHyperedgeTreeRoots;
for (JunctionSet::iterator curr = m_hyperedge_tree_roots.begin();
curr != m_hyperedge_tree_roots.end(); ++curr)
{
HyperedgeTreeNode *node = m_hyperedge_tree_junctions[*curr];
- bool containsCycle = node->removeOtherJunctionsFrom(NULL,
+ bool containsCycle = node->removeOtherJunctionsFrom(nullptr,
m_hyperedge_tree_roots);
if (containsCycle)
{
@@ -970,16 +972,16 @@ void HyperedgeImprover::execute(bool canMakeMajorChanges)
{
HyperedgeTreeNode *treeRoot = m_hyperedge_tree_junctions[*curr];
COLA_ASSERT(treeRoot);
- treeRoot->updateConnEnds(NULL, m_router, m_changed_connectors);
-
+ treeRoot->updateConnEnds(nullptr, m_router, m_changed_connectors);
+
// Validate the rewrtten connections.
- treeRoot->validateHyperedge(NULL, 0);
+ treeRoot->validateHyperedge(nullptr, 0);
}
}
// Write back final recommended positions to junctions.
- for (JunctionHyperedgeTreeNodeMap::iterator curr =
- m_hyperedge_tree_junctions.begin();
+ for (JunctionHyperedgeTreeNodeMap::iterator curr =
+ m_hyperedge_tree_junctions.begin();
curr != m_hyperedge_tree_junctions.end(); ++curr)
{
HyperedgeTreeNode *node = curr->second;
@@ -997,7 +999,7 @@ void HyperedgeImprover::execute(bool canMakeMajorChanges)
{
HyperedgeTreeNode *node = m_hyperedge_tree_junctions[*curr];
- node->deleteEdgesExcept(NULL);
+ node->deleteEdgesExcept(nullptr);
delete node;
}
@@ -1021,7 +1023,7 @@ void HyperedgeImprover::execute(bool canMakeMajorChanges)
}
-HyperedgeNewAndDeletedObjectLists
+HyperedgeNewAndDeletedObjectLists
HyperedgeImprover::newAndDeletedObjectLists(void) const
{
HyperedgeNewAndDeletedObjectLists result;
@@ -1046,7 +1048,7 @@ HyperedgeTreeNode *HyperedgeImprover::moveJunctionAlongCommonEdge(
{
COLA_ASSERT(self->junction);
- HyperedgeTreeNode *newSelf = NULL;
+ HyperedgeTreeNode *newSelf = nullptr;
std::vector<HyperedgeTreeEdge *> commonEdges;
std::vector<HyperedgeTreeEdge *> otherEdges;
@@ -1074,7 +1076,7 @@ HyperedgeTreeNode *HyperedgeImprover::moveJunctionAlongCommonEdge(
commonEdges.push_back(currEdge);
// Consider each of the other edges.
- for (std::list<HyperedgeTreeEdge *>::iterator curr2 =
+ for (std::list<HyperedgeTreeEdge *>::iterator curr2 =
self->edges.begin(); curr2 != self->edges.end(); ++curr2)
{
if (curr == curr2)
@@ -1082,7 +1084,7 @@ HyperedgeTreeNode *HyperedgeImprover::moveJunctionAlongCommonEdge(
// Except the current (curr) one.
continue;
}
-
+
HyperedgeTreeEdge *otherEdge = *curr2;
if (otherEdge->hasFixedRoute)
{
@@ -1090,7 +1092,7 @@ HyperedgeTreeNode *HyperedgeImprover::moveJunctionAlongCommonEdge(
otherEdges.push_back(otherEdge);
continue;
}
-
+
HyperedgeTreeNode *otherNode = otherEdge->followFrom(self);
if (otherNode->point == currNode->point)
{
@@ -1105,7 +1107,7 @@ HyperedgeTreeNode *HyperedgeImprover::moveJunctionAlongCommonEdge(
commonEdges.push_back(otherEdge);
}
}
- else if (pointOnLine(self->point, otherNode->point,
+ else if (pointOnLine(self->point, otherNode->point,
currNode->point))
{
// A common edge can be a (longer) collinear line, but we
@@ -1122,14 +1124,14 @@ HyperedgeTreeNode *HyperedgeImprover::moveJunctionAlongCommonEdge(
// For the purpose of these changes a junction is considered fixed
// only when not performing major improvements.
- bool selfFixed = self->junction->positionFixed() &&
+ bool selfFixed = self->junction->positionFixed() &&
!m_can_make_major_changes;
-
+
if ((commonEdges.size() > 1) && (otherEdges.size() <= 1) && !selfFixed)
{
- // One of the common nodes becomes the target node, we move
+ // One of the common nodes becomes the target node, we move
// all connections from the other common nodes to this node.
- // We also move the junction there and remove it from the
+ // We also move the junction there and remove it from the
// current node.
HyperedgeTreeNode *targetNode = commonEdges[0]->followFrom(self);
for (size_t i = 1; i < commonEdges.size(); ++i)
@@ -1141,7 +1143,7 @@ HyperedgeTreeNode *HyperedgeImprover::moveJunctionAlongCommonEdge(
delete commonEdges[i];
}
targetNode->junction = self->junction;
- self->junction = NULL;
+ self->junction = nullptr;
if (otherEdges.empty())
{
@@ -1162,15 +1164,15 @@ HyperedgeTreeNode *HyperedgeImprover::moveJunctionAlongCommonEdge(
break;
}
- else if (m_can_make_major_changes && (commonEdges.size() > 1) &&
+ else if (m_can_make_major_changes && (commonEdges.size() > 1) &&
(otherEdges.size() > 1))
{
- // Case where this is one junction we need to split into two,
+ // Case where this is one junction we need to split into two,
// because we have a common path leading to it that we want to
- // move the junction along, but multiple other edges leaving
+ // move the junction along, but multiple other edges leaving
// this junction that need to stay in place.
- // One of the common nodes becomes the target node, we move
+ // One of the common nodes becomes the target node, we move
// all connections from the other common nodes to this node.
// We will also create a new junction there.
HyperedgeTreeNode *targetNode = commonEdges[0]->followFrom(self);
@@ -1192,7 +1194,7 @@ HyperedgeTreeNode *HyperedgeImprover::moveJunctionAlongCommonEdge(
nodeMapHasChanged = true;
m_new_junctions.push_back(targetNode->junction);
- // And we create a new connector between the original junction
+ // And we create a new connector between the original junction
// and the new junction.
ConnRef *conn = new ConnRef(m_router);
m_router->removeObjectFromQueuedActions(conn);
@@ -1228,4 +1230,3 @@ HyperedgeTreeNode *HyperedgeImprover::moveJunctionAlongCommonEdge(
}
-
diff --git a/src/3rdparty/adaptagrams/libavoid/hyperedgeimprover.h b/src/3rdparty/adaptagrams/libavoid/hyperedgeimprover.h
index 48ca11ead..958c877f3 100644
--- a/src/3rdparty/adaptagrams/libavoid/hyperedgeimprover.h
+++ b/src/3rdparty/adaptagrams/libavoid/hyperedgeimprover.h
@@ -114,7 +114,7 @@ private:
// Output the hyperedge tree to an SVG file, optionally highlighting
// a segment of interest (usually the segment being moved).
void outputHyperedgesToSVG(unsigned int pass,
- HyperedgeShiftSegment *activeSegment = NULL);
+ HyperedgeShiftSegment *activeSegment = nullptr);
// Given a junction, this method follows the attached connectors and
// junctions to determine a hyperedge and returns the set of vertices
diff --git a/src/3rdparty/adaptagrams/libavoid/hyperedgetree.cpp b/src/3rdparty/adaptagrams/libavoid/hyperedgetree.cpp
index d795be801..b9cf1a0d3 100644
--- a/src/3rdparty/adaptagrams/libavoid/hyperedgetree.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/hyperedgetree.cpp
@@ -39,9 +39,9 @@ namespace Avoid {
// Constructs a new hyperedge tree node.
//
HyperedgeTreeNode::HyperedgeTreeNode()
- : junction(NULL),
- shiftSegmentNodeSet(NULL),
- finalVertex(NULL),
+ : junction(nullptr),
+ shiftSegmentNodeSet(nullptr),
+ finalVertex(nullptr),
isConnectorSource(false),
isPinDummyEndpoint(false),
visited(false)
@@ -53,7 +53,7 @@ HyperedgeTreeNode::~HyperedgeTreeNode()
if (shiftSegmentNodeSet)
{
shiftSegmentNodeSet->erase(this);
- shiftSegmentNodeSet = NULL;
+ shiftSegmentNodeSet = nullptr;
}
}
@@ -94,9 +94,9 @@ bool HyperedgeTreeNode::removeOtherJunctionsFrom(HyperedgeTreeEdge *ignored,
return containsCycle;
}
- if (junction && (ignored != NULL))
+ if (junction && (ignored != nullptr))
{
- // Remove junctions other than the first (when ignored == NULL).
+ // Remove junctions other than the first (when ignored == nullptr).
treeRoots.erase(junction);
}
visited = true;
@@ -480,9 +480,9 @@ void HyperedgeTreeEdge::replaceNode(HyperedgeTreeNode *oldNode,
void HyperedgeTreeEdge::writeEdgesToConns(HyperedgeTreeNode *ignored,
size_t pass)
{
- COLA_ASSERT(ignored != NULL);
- COLA_ASSERT(ends.first != NULL);
- COLA_ASSERT(ends.second != NULL);
+ COLA_ASSERT(ignored != nullptr);
+ COLA_ASSERT(ends.first != nullptr);
+ COLA_ASSERT(ends.second != nullptr);
HyperedgeTreeNode *prevNode =
(ignored == ends.first) ? ends.first : ends.second;
@@ -570,8 +570,8 @@ void HyperedgeTreeEdge::writeEdgesToConns(HyperedgeTreeNode *ignored,
void HyperedgeTreeEdge::addConns(HyperedgeTreeNode *ignored, Router *router,
ConnRefList& oldConns)
{
- COLA_ASSERT(conn != NULL);
- HyperedgeTreeNode *endNode = NULL;
+ COLA_ASSERT(conn != nullptr);
+ HyperedgeTreeNode *endNode = nullptr;
if (ends.first && (ends.first != ignored))
{
endNode = ends.first;
@@ -622,7 +622,7 @@ void HyperedgeTreeEdge::addConns(HyperedgeTreeNode *ignored, Router *router,
void HyperedgeTreeEdge::updateConnEnds(HyperedgeTreeNode *ignored,
bool forward, ConnRefList& changedConns)
{
- HyperedgeTreeNode *endNode = NULL;
+ HyperedgeTreeNode *endNode = nullptr;
if (ends.first && (ends.first != ignored))
{
endNode = ends.first;
@@ -748,13 +748,13 @@ void HyperedgeTreeEdge::splitFromNodeAtPoint(HyperedgeTreeNode *source,
//
void HyperedgeTreeEdge::disconnectEdge(void)
{
- COLA_ASSERT(ends.first != NULL);
- COLA_ASSERT(ends.second != NULL);
+ COLA_ASSERT(ends.first != nullptr);
+ COLA_ASSERT(ends.second != nullptr);
ends.first->disconnectEdge(this);
ends.second->disconnectEdge(this);
- ends.first = NULL;
- ends.second = NULL;
+ ends.first = nullptr;
+ ends.second = nullptr;
}
@@ -788,14 +788,14 @@ void HyperedgeTreeEdge::deleteNodesExcept(HyperedgeTreeNode *ignored)
ends.first->deleteEdgesExcept(this);
delete ends.first;
}
- ends.first = NULL;
+ ends.first = nullptr;
if (ends.second && (ends.second != ignored))
{
ends.second->deleteEdgesExcept(this);
delete ends.second;
}
- ends.second = NULL;
+ ends.second = nullptr;
}
diff --git a/src/3rdparty/adaptagrams/libavoid/junction.cpp b/src/3rdparty/adaptagrams/libavoid/junction.cpp
index a1918b4a3..f17e37e96 100644
--- a/src/3rdparty/adaptagrams/libavoid/junction.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/junction.cpp
@@ -23,6 +23,7 @@
*/
#include <cstdlib>
+#include <algorithm>
#include "libavoid/junction.h"
#include "libavoid/router.h"
@@ -173,7 +174,7 @@ void JunctionRef::moveAttachedConns(const Point& newPosition)
curr != m_following_conns.end(); ++curr)
{
ConnEnd *connEnd = *curr;
- COLA_ASSERT(connEnd->m_conn_ref != NULL);
+ COLA_ASSERT(connEnd->m_conn_ref != nullptr);
m_router->modifyConnector(connEnd->m_conn_ref, connEnd->endpointType(),
*connEnd);
}
@@ -190,25 +191,25 @@ ConnRef *JunctionRef::removeJunctionAndMergeConnectors(void)
{
if (m_following_conns.size() != 2)
{
- return NULL;
+ return nullptr;
}
std::set<ConnEnd *>::iterator curr = m_following_conns.begin();
ConnEnd *connEnd1 = *curr;
++curr;
ConnEnd *connEnd2 = *curr;
- COLA_ASSERT(connEnd2->m_conn_ref != NULL);
- COLA_ASSERT(connEnd1->m_conn_ref != NULL);
+ COLA_ASSERT(connEnd2->m_conn_ref != nullptr);
+ COLA_ASSERT(connEnd1->m_conn_ref != nullptr);
// The second conn will be the one we will delete.
ConnRef *conn2 = connEnd2->m_conn_ref;
// Determine its endpoint that is not attached to the junction.
ConnEnd *connEnd2Other = (conn2->m_src_connend == connEnd2) ?
conn2->m_dst_connend : conn2->m_src_connend;
- if (connEnd2Other == NULL)
+ if (connEnd2Other == nullptr)
{
// If it doesn't have a valid other endpoint, then ignore.
- return NULL;
+ return nullptr;
}
// Modify the first connector's junction endpoint to connect to the
// other end of the second connector.
diff --git a/src/3rdparty/adaptagrams/libavoid/junction.h b/src/3rdparty/adaptagrams/libavoid/junction.h
index ed73fac34..f348c39f6 100644
--- a/src/3rdparty/adaptagrams/libavoid/junction.h
+++ b/src/3rdparty/adaptagrams/libavoid/junction.h
@@ -134,9 +134,9 @@ class AVOID_EXPORT JunctionRef : public Obstacle
//! processed by the router.
//!
//! If there are more than two connectors attached to the junction
- //! then nothing will be changed and this method will return NULL.
+ //! then nothing will be changed and this method will return nullptr.
//!
- //! @return The merged connector, or NULL if the junction was not
+ //! @return The merged connector, or nullptr if the junction was not
//! removed.
ConnRef *removeJunctionAndMergeConnectors(void);
diff --git a/src/3rdparty/adaptagrams/libavoid/libavoid.vcxproj b/src/3rdparty/adaptagrams/libavoid/libavoid.vcxproj
index b0c4574c0..e563b751e 100755
--- a/src/3rdparty/adaptagrams/libavoid/libavoid.vcxproj
+++ b/src/3rdparty/adaptagrams/libavoid/libavoid.vcxproj
@@ -147,6 +147,7 @@
<ClCompile Include="geomtypes.cpp" />
<ClCompile Include="graph.cpp" />
<ClCompile Include="hyperedge.cpp" />
+ <ClCompile Include="hyperedgeimprover.cpp" />
<ClCompile Include="hyperedgetree.cpp" />
<ClCompile Include="junction.cpp" />
<ClCompile Include="makepath.cpp" />
@@ -169,10 +170,12 @@
<ClInclude Include="connector.h" />
<ClInclude Include="connend.h" />
<ClInclude Include="debug.h" />
+ <ClInclude Include="dllexport.h" />
<ClInclude Include="geometry.h" />
<ClInclude Include="geomtypes.h" />
<ClInclude Include="graph.h" />
<ClInclude Include="hyperedge.h" />
+ <ClInclude Include="hyperedgeimprover.h" />
<ClInclude Include="hyperedgetree.h" />
<ClInclude Include="junction.h" />
<ClInclude Include="libavoid.h" />
diff --git a/src/3rdparty/adaptagrams/libavoid/makepath.cpp b/src/3rdparty/adaptagrams/libavoid/makepath.cpp
index 329d5974d..8e8f4f056 100644
--- a/src/3rdparty/adaptagrams/libavoid/makepath.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/makepath.cpp
@@ -64,16 +64,16 @@ class ANode
g(0),
h(0),
f(0),
- prevNode(NULL),
+ prevNode(nullptr),
timeStamp(time)
{
}
ANode()
- : inf(NULL),
+ : inf(nullptr),
g(0),
h(0),
f(0),
- prevNode(NULL),
+ prevNode(nullptr),
timeStamp(-1)
{
}
@@ -216,7 +216,7 @@ static void constructPolygonPath(Polygon& connRoute, VertInf *inf2,
bool simplified = true;
int routeSize = 2;
- for (ANode *curr = inf1Node; curr != NULL; curr = curr->prevNode)
+ for (ANode *curr = inf1Node; curr != nullptr; curr = curr->prevNode)
{
routeSize += 1;
}
@@ -225,7 +225,7 @@ static void constructPolygonPath(Polygon& connRoute, VertInf *inf2,
connRoute.ps[routeSize - 1] = inf3->point;
connRoute.ps[routeSize - 2] = inf2->point;
routeSize -= 3;
- for (ANode *curr = inf1Node; curr != NULL; curr = curr->prevNode)
+ for (ANode *curr = inf1Node; curr != nullptr; curr = curr->prevNode)
{
// For connection pins, we stop and don't include the fake shape
// center as part of this path.
@@ -309,12 +309,12 @@ static double cost(ConnRef *lineRef, const double dist, VertInf *inf2,
VertInf *inf3, ANode *inf1Node)
{
bool isOrthogonal = (lineRef->routingType() == ConnType_Orthogonal);
- VertInf *inf1 = (inf1Node) ? inf1Node->inf : NULL;
+ VertInf *inf1 = (inf1Node) ? inf1Node->inf : nullptr;
double result = dist;
Polygon connRoute;
Router *router = inf2->_router;
- if (inf1 != NULL)
+ if (inf1 != nullptr)
{
const double angle_penalty = router->routingParameter(anglePenalty);
const double segmt_penalty = router->routingParameter(segmentPenalty);
@@ -798,7 +798,7 @@ static double estimatedCostSpecific(ConnRef *lineRef, const Point *last,
int bendCount = 0;
double xmove = costTarPoint.x - curr.x;
double ymove = costTarPoint.y - curr.y;
- if (last == NULL)
+ if (last == nullptr)
{
// This is just the initial point. Penalise it simply if it is
// not inline with the target in either the x- or y-dimension.
@@ -968,7 +968,7 @@ void AStarPathPrivate::search(ConnRef *lineRef, VertInf *src, VertInf *tar, Vert
bool isOrthogonal = (lineRef->routingType() == ConnType_Orthogonal);
- if (start == NULL)
+ if (start == nullptr)
{
start = src;
}
@@ -1074,7 +1074,7 @@ void AStarPathPrivate::search(ConnRef *lineRef, VertInf *src, VertInf *tar, Vert
size_t exploredCount = 0;
ANode node, ati;
- ANode *bestNode = NULL; // Temporary bestNode
+ ANode *bestNode = nullptr; // Temporary bestNode
bool bNodeFound = false; // Flag if node is found in container
int timestamp = 1;
@@ -1084,7 +1084,7 @@ void AStarPathPrivate::search(ConnRef *lineRef, VertInf *src, VertInf *tar, Vert
COLA_ASSERT(router->IgnoreRegions == true);
const PolyLine& currRoute = lineRef->route();
- VertInf *last = NULL;
+ VertInf *last = nullptr;
int rIndx = 0;
while (last != start)
{
@@ -1096,14 +1096,14 @@ void AStarPathPrivate::search(ConnRef *lineRef, VertInf *src, VertInf *tar, Vert
db_printf("/// %d %d\n", pnt.id, pnt.vn);
#endif
VertInf *curr = router->vertices.getVertexByID(vID);
- COLA_ASSERT(curr != NULL);
+ COLA_ASSERT(curr != nullptr);
node = ANode(curr, timestamp++);
if (!last)
{
node.inf = src;
node.g = 0;
- node.h = estimatedCost(lineRef, NULL, node.inf->point);
+ node.h = estimatedCost(lineRef, nullptr, node.inf->point);
node.f = node.g + node.h;
}
@@ -1162,9 +1162,9 @@ void AStarPathPrivate::search(ConnRef *lineRef, VertInf *src, VertInf *tar, Vert
// Create the start node
node = ANode(src, timestamp++);
node.g = 0;
- node.h = estimatedCost(lineRef, NULL, node.inf->point);
+ node.h = estimatedCost(lineRef, nullptr, node.inf->point);
node.f = node.g + node.h;
- // Set a null parent, so cost function knows this is the first segment.
+ // Set a nullptr parent, so cost function knows this is the first segment.
node.prevNode = bestNode;
// Populate the PENDING container with the first location
@@ -1172,7 +1172,7 @@ void AStarPathPrivate::search(ConnRef *lineRef, VertInf *src, VertInf *tar, Vert
PENDING.push_back(newNode);
}
- tar->pathNext = NULL;
+ tar->pathNext = nullptr;
// Create a heap from PENDING for sorting
using std::make_heap; using std::push_heap; using std::pop_heap;
@@ -1229,7 +1229,7 @@ void AStarPathPrivate::search(ConnRef *lineRef, VertInf *src, VertInf *tar, Vert
bestNodeInf->aStarDoneNodes.push_back(bestNode);
++exploredCount;
- VertInf *prevInf = (bestNode->prevNode) ? bestNode->prevNode->inf : NULL;
+ VertInf *prevInf = (bestNode->prevNode) ? bestNode->prevNode->inf : nullptr;
#ifdef ASTAR_DEBUG
db_printf("Considering... ");
db_printf(" %g %g ", bestNodeInf->point.x, bestNodeInf->point.y);
@@ -1295,7 +1295,7 @@ void AStarPathPrivate::search(ConnRef *lineRef, VertInf *src, VertInf *tar, Vert
node.prevNode = bestNode;
VertInf *prevInf = (bestNode->prevNode) ?
- bestNode->prevNode->inf : NULL;
+ bestNode->prevNode->inf : nullptr;
// Don't bother looking at the segment we just arrived along.
if (prevInf && (prevInf == node.inf))
diff --git a/src/3rdparty/adaptagrams/libavoid/mtst.cpp b/src/3rdparty/adaptagrams/libavoid/mtst.cpp
index 7aac2b58e..d6c288ff7 100644
--- a/src/3rdparty/adaptagrams/libavoid/mtst.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/mtst.cpp
@@ -8,9 +8,9 @@
* --------------------------------------------------------------------
* Sequential Construction of the Minimum Terminal Spanning Tree is an
* extended version of the method described in Section IV.B of:
- * Long, J., Zhou, H., Memik, S.O. (2008). EBOARST: An efficient
- * edge-based obstacle-avoiding rectilinear Steiner tree construction
- * algorithm. IEEE Trans. on Computer-Aided Design of Integrated
+ * Long, J., Zhou, H., Memik, S.O. (2008). EBOARST: An efficient
+ * edge-based obstacle-avoiding rectilinear Steiner tree construction
+ * algorithm. IEEE Trans. on Computer-Aided Design of Integrated
* Circuits and Systems 27(12), pages 2169--2182.
* --------------------------------------------------------------------
*
@@ -21,12 +21,12 @@
* See the file LICENSE.LGPL distributed with the library.
*
* Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
+ * accordance with the commercial license agreement provided with the
* library.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Author(s): Michael Wybrow
*/
@@ -34,6 +34,7 @@
#include <cfloat>
#include <vector>
#include <algorithm>
+#include <string>
#include <cstring>
@@ -65,7 +66,7 @@ bool CmpEdgeInf::operator()(const EdgeInf *a, const EdgeInf *b) const
struct delete_vertex
{
void operator()(VertInf *ptr)
- {
+ {
ptr->removeFromGraph(false);
delete ptr;
}
@@ -78,7 +79,7 @@ MinimumTerminalSpanningTree::MinimumTerminalSpanningTree(Router *router,
isOrthogonal(true),
terminals(terminals),
hyperedgeTreeJunctions(hyperedgeTreeJunctions),
- m_rootJunction(NULL),
+ m_rootJunction(nullptr),
bendPenalty(2000),
dimensionChangeVertexID(0, 42)
{
@@ -88,9 +89,9 @@ MinimumTerminalSpanningTree::MinimumTerminalSpanningTree(Router *router,
MinimumTerminalSpanningTree::~MinimumTerminalSpanningTree()
{
// Free the temporary hyperedge tree representation.
- m_rootJunction->deleteEdgesExcept(NULL);
+ m_rootJunction->deleteEdgesExcept(nullptr);
delete m_rootJunction;
- m_rootJunction = NULL;
+ m_rootJunction = nullptr;
}
@@ -131,10 +132,10 @@ void MinimumTerminalSpanningTree::unionSets(VertexSetList::iterator s1,
allsets.push_back(s);
}
-HyperedgeTreeNode *MinimumTerminalSpanningTree::addNode(VertInf *vertex,
+HyperedgeTreeNode *MinimumTerminalSpanningTree::addNode(VertInf *vertex,
HyperedgeTreeNode *prevNode)
{
- HyperedgeTreeNode *node = NULL;
+ HyperedgeTreeNode *node = nullptr;
// Do we already have a node for this vertex?
VertexNodeMap::iterator match = nodes.find(vertex);
@@ -152,14 +153,14 @@ HyperedgeTreeNode *MinimumTerminalSpanningTree::addNode(VertInf *vertex,
{
// Found.
HyperedgeTreeNode *junctionNode = match->second;
- if (junctionNode->junction == NULL)
+ if (junctionNode->junction == nullptr)
{
// Create a junction, if one has not already been created.
junctionNode->junction = new JunctionRef(router, vertex->point);
- if (m_rootJunction == NULL)
+ if (m_rootJunction == nullptr)
{
- // Remember the first junction node, so we can use it to
- // traverse the tree, added and connecting connectors to
+ // Remember the first junction node, so we can use it to
+ // traverse the tree, added and connecting connectors to
// junctions and endpoints.
m_rootJunction = junctionNode;
}
@@ -172,7 +173,7 @@ HyperedgeTreeNode *MinimumTerminalSpanningTree::addNode(VertInf *vertex,
if (prevNode)
{
// Join this node to the previous node.
- new HyperedgeTreeEdge(prevNode, node, NULL);
+ new HyperedgeTreeEdge(prevNode, node, nullptr);
}
return node;
@@ -187,7 +188,7 @@ void MinimumTerminalSpanningTree::buildHyperedgeTreeToRoot(VertInf *currVert,
return;
}
- COLA_ASSERT(currVert != NULL);
+ COLA_ASSERT(currVert != nullptr);
// This method follows branches in a shortest path tree back to the
// root, generating hyperedge tree nodes and branches as it goes.
@@ -201,11 +202,11 @@ void MinimumTerminalSpanningTree::buildHyperedgeTreeToRoot(VertInf *currVert,
//COLA_ASSERT( !(currVert->id == dimensionChangeVertexID) );
//COLA_ASSERT( !(prevVert->id == dimensionChangeVertexID) );
EdgeInf *edge = prevVert->hasNeighbour(currVert, isOrthogonal);
- if (edge == NULL && (currVert->id == dimensionChangeVertexID))
+ if (edge == nullptr && (currVert->id == dimensionChangeVertexID))
{
- VertInf *modCurr = (currVert->id == dimensionChangeVertexID) ?
+ VertInf *modCurr = (currVert->id == dimensionChangeVertexID) ?
currVert->m_orthogonalPartner : currVert;
- VertInf *modPrev = (prevVert->id == dimensionChangeVertexID) ?
+ VertInf *modPrev = (prevVert->id == dimensionChangeVertexID) ?
prevVert->m_orthogonalPartner : prevVert;
edge = modPrev->hasNeighbour(modCurr, isOrthogonal);
}
@@ -226,9 +227,9 @@ void MinimumTerminalSpanningTree::buildHyperedgeTreeToRoot(VertInf *currVert,
break;
}
- if (currVert->pathNext == NULL)
+ if (currVert->pathNext == nullptr)
{
- // This is a terminal of the hyperedge, mark the node with the
+ // This is a terminal of the hyperedge, mark the node with the
// vertex representing the endpoint of the connector so we can
// later use this to set the correct ConnEnd for the connector.
currentNode->finalVertex = currVert;
@@ -236,7 +237,7 @@ void MinimumTerminalSpanningTree::buildHyperedgeTreeToRoot(VertInf *currVert,
if (currVert->id.isDummyPinHelper())
{
- // Note if we have an extra dummy vertex for connecting
+ // Note if we have an extra dummy vertex for connecting
// to possible connection pins.
currentNode->isPinDummyEndpoint = true;
}
@@ -250,7 +251,7 @@ void MinimumTerminalSpanningTree::buildHyperedgeTreeToRoot(VertInf *currVert,
VertInf **MinimumTerminalSpanningTree::resetDistsForPath(VertInf *currVert, VertInf **newRootVertPtr)
{
- COLA_ASSERT(currVert != NULL);
+ COLA_ASSERT(currVert != nullptr);
// This method follows branches in a shortest path tree back to the
// root, generating hyperedge tree nodes and branches as it goes.
@@ -274,7 +275,7 @@ VertInf **MinimumTerminalSpanningTree::resetDistsForPath(VertInf *currVert, Vert
// Shouldn't get here.
COLA_ASSERT(false);
- return NULL;
+ return nullptr;
}
@@ -308,7 +309,7 @@ void MinimumTerminalSpanningTree::constructSequential(void)
k = k->lstNext)
{
k->sptfDist = DBL_MAX;
- k->pathNext = NULL;
+ k->pathNext = nullptr;
k->setSPTFRoot(k);
}
for (std::set<VertInf *>::iterator ti = terminals.begin();
@@ -337,8 +338,8 @@ void MinimumTerminalSpanningTree::constructSequential(void)
// For each edge from this vertex...
EdgeInfList& visList = (!isOrthogonal) ? u->visList : u->orthogVisList;
EdgeInfList::const_iterator finish = visList.end();
- VertInf *extraVertex = NULL;
- for (EdgeInfList::const_iterator edge = visList.begin();
+ VertInf *extraVertex = nullptr;
+ for (EdgeInfList::const_iterator edge = visList.begin();
edge != finish; ++edge)
{
VertInf *v = (*edge)->otherVert(u);
@@ -352,7 +353,7 @@ void MinimumTerminalSpanningTree::constructSequential(void)
}
// Ignore an edge we have already explored.
- if (u->pathNext == v ||
+ if (u->pathNext == v ||
(u->pathNext && u->pathNext->pathNext == v))
{
continue;
@@ -379,9 +380,9 @@ void MinimumTerminalSpanningTree::constructSequential(void)
double newCost = (u->sptfDist + edgeDist);
double freeConnection = connectsWithoutBend(u, v);
- COLA_ASSERT(!freeConnection == (u->pathNext && ! colinear(u->pathNext->point,
+ COLA_ASSERT(!freeConnection == (u->pathNext && ! colinear(u->pathNext->point,
u->point, v->point)));
- if (!freeConnection)
+ if (!freeConnection)
{
// This edge is not colinear, so add it to the dummy node and
// ignore it.
@@ -401,10 +402,10 @@ void MinimumTerminalSpanningTree::constructSequential(void)
// Add a copy of the ignored edge to the dummy node, so it
// may be explored later.
EdgeInf *extraEdge = new EdgeInf(extraVertex, v, isOrthogonal);
- extraEdge->setDist(edgeDist);
+ extraEdge->setDist(edgeDist);
continue;
}
-
+
if (newCost < v->sptfDist && v->sptfRoot() == v)
{
// We have got to a node we haven't explored to from any tree.
@@ -423,19 +424,19 @@ void MinimumTerminalSpanningTree::constructSequential(void)
}
#endif
}
- else
+ else
{
// We have reached a node that has been reached already through
// a different tree. Set the MTST distance for the bridging
// edge and push it to the priority queue of edges to consider
// during the extended Kruskal's algorithm.
- double secondJoinCost = connectsWithoutBend(v, u) ?
+ double secondJoinCost = connectsWithoutBend(v, u) ?
0.0 : bendPenalty;
- // The default cost is the cost back to the root of each
+ // The default cost is the cost back to the root of each
// forest plus the length of this edge.
- double cost = (*edge)->m_vert1->sptfDist +
- (*edge)->m_vert2->sptfDist + secondJoinCost +
+ double cost = (*edge)->m_vert1->sptfDist +
+ (*edge)->m_vert2->sptfDist + secondJoinCost +
(*edge)->getDist();
(*edge)->setMtstDist(cost);
beHeap.push_back(*edge);
@@ -489,11 +490,11 @@ void MinimumTerminalSpanningTree::constructSequential(void)
// Connect this edge into the MTST by building HyperedgeTree nodes
// and edges for this edge and the path back to the tree root.
- HyperedgeTreeNode *node1 = NULL;
- HyperedgeTreeNode *node2 = NULL;
+ HyperedgeTreeNode *node1 = nullptr;
+ HyperedgeTreeNode *node2 = nullptr;
if (hyperedgeTreeJunctions)
{
- node1 = addNode(e->m_vert1, NULL);
+ node1 = addNode(e->m_vert1, nullptr);
node2 = addNode(e->m_vert2, node1);
}
@@ -519,16 +520,16 @@ void MinimumTerminalSpanningTree::constructSequential(void)
TIMER_STOP(router);
}
-VertInf *MinimumTerminalSpanningTree::orthogonalPartner(VertInf *vert,
+VertInf *MinimumTerminalSpanningTree::orthogonalPartner(VertInf *vert,
double penalty)
{
if (penalty == 0)
{
penalty = bendPenalty;
}
- if (vert->m_orthogonalPartner == NULL)
+ if (vert->m_orthogonalPartner == nullptr)
{
- vert->m_orthogonalPartner = new VertInf(router,
+ vert->m_orthogonalPartner = new VertInf(router,
dimensionChangeVertexID, vert->point, false);
vert->m_orthogonalPartner->m_orthogonalPartner = vert;
extraVertices.push_back(vert->m_orthogonalPartner);
@@ -552,7 +553,7 @@ void MinimumTerminalSpanningTree::removeInvalidBridgingEdges()
VertexPair ends = realVerticesCountingPartners(e);
bool valid = (ends.first->treeRoot() != ends.second->treeRoot()) &&
- ends.first->treeRoot() && ends.second->treeRoot() &&
+ ends.first->treeRoot() && ends.second->treeRoot() &&
(origTerminals.find(ends.first->treeRoot()) != origTerminals.end()) &&
(origTerminals.find(ends.second->treeRoot()) != origTerminals.end());
if (!valid)
@@ -579,8 +580,8 @@ LayeredOrthogonalEdgeList MinimumTerminalSpanningTree::
LayeredOrthogonalEdgeList edgeList;
COLA_ASSERT(vert);
-
- double penalty = (prev == NULL) ? 0.1 : 0;
+
+ double penalty = (prev == nullptr) ? 0.1 : 0;
orthogonalPartner(vert, penalty);
bool isRealVert = (vert->id != dimensionChangeVertexID);
@@ -591,7 +592,7 @@ LayeredOrthogonalEdgeList MinimumTerminalSpanningTree::
for (EdgeInfList::const_iterator edge = visList.begin(); edge != finish; ++edge)
{
VertInf *other = (*edge)->otherVert(realVert);
-
+
if (other == orthogonalPartner(realVert))
{
VertInf *partner = (isRealVert) ? other : orthogonalPartner(other);
@@ -601,10 +602,10 @@ LayeredOrthogonalEdgeList MinimumTerminalSpanningTree::
}
continue;
}
-
+
VertInf *partner = (isRealVert) ? other : orthogonalPartner(other);
COLA_ASSERT(partner);
-
+
if (other->point.y == realVert->point.y)
{
if (isRealVert && (prev != partner))
@@ -625,7 +626,7 @@ LayeredOrthogonalEdgeList MinimumTerminalSpanningTree::
edgeList.push_back(std::make_pair(*edge, other));
}
}
-
+
return edgeList;
}
@@ -645,9 +646,9 @@ void MinimumTerminalSpanningTree::constructInterleaved(void)
k = k->lstNext)
{
k->sptfDist = DBL_MAX;
- k->pathNext = NULL;
- k->setTreeRootPointer(NULL);
- k->m_orthogonalPartner = NULL;
+ k->pathNext = nullptr;
+ k->setTreeRootPointer(nullptr);
+ k->m_orthogonalPartner = nullptr;
}
#ifdef DEBUGHANDLER
@@ -675,7 +676,7 @@ void MinimumTerminalSpanningTree::constructInterleaved(void)
}
std::make_heap(vHeap.begin(), vHeap.end(), vHeapCompare);
-
+
// Shortest Path Terminal Forest construction
//
while ( ! vHeap.empty() )
@@ -684,7 +685,7 @@ void MinimumTerminalSpanningTree::constructInterleaved(void)
VertInf *u = vHeap.front();
// There should be no orphaned vertices.
- COLA_ASSERT(u->treeRoot() != NULL);
+ COLA_ASSERT(u->treeRoot() != nullptr);
COLA_ASSERT(u->pathNext || (u->sptfDist == 0));
if (!beHeap.empty() && u->sptfDist >= (0.5 * beHeap.front()->mtstDist()))
@@ -708,7 +709,7 @@ void MinimumTerminalSpanningTree::constructInterleaved(void)
{
break;
}
-
+
removeInvalidBridgingEdges();
// Don't pop this vertex, but continue.
@@ -722,7 +723,7 @@ void MinimumTerminalSpanningTree::constructInterleaved(void)
// For each edge from this vertex...
LayeredOrthogonalEdgeList edgeList = getOrthogonalEdgesFromVertex(u,
u->pathNext);
- for (LayeredOrthogonalEdgeList::const_iterator edge = edgeList.begin();
+ for (LayeredOrthogonalEdgeList::const_iterator edge = edgeList.begin();
edge != edgeList.end(); ++edge)
{
VertInf *v = edge->second;
@@ -754,10 +755,10 @@ void MinimumTerminalSpanningTree::constructInterleaved(void)
// original edges, so these may be explored when the algorithm
// explores the dummy node. Obviously we also need to clean up
// these dummy nodes and edges later.
- if (v->treeRoot() == NULL)
+ if (v->treeRoot() == nullptr)
{
double newCost = (u->sptfDist + edgeDist);
-
+
// We have got to a node we haven't explored to from any tree.
// So attach it to the tree and update it with the distance
// from the root to reach this vertex. Then add the vertex
@@ -766,7 +767,7 @@ void MinimumTerminalSpanningTree::constructInterleaved(void)
v->pathNext = u;
v->setTreeRootPointer(u->treeRootPointer());
vHeap.push_back(v);
- // This can change the cost of other vertices in the heap,
+ // This can change the cost of other vertices in the heap,
// so we need to remake it.
std::make_heap(vHeap.begin(), vHeap.end(), vHeapCompare);
@@ -777,7 +778,7 @@ void MinimumTerminalSpanningTree::constructInterleaved(void)
}
#endif
}
- else
+ else
{
// We have reached a node that has been reached already through
// a different tree. Set the MTST distance for the bridging
@@ -836,7 +837,7 @@ bool MinimumTerminalSpanningTree::connectsWithoutBend(VertInf *oldLeaf,
if (oldLeaf->sptfDist == 0)
{
bool hyperedgeConnection = false;
- EdgeInfList& visList = (!isOrthogonal) ?
+ EdgeInfList& visList = (!isOrthogonal) ?
oldLeaf->visList : oldLeaf->orthogVisList;
EdgeInfList::const_iterator finish = visList.end();
for (EdgeInfList::const_iterator edge = visList.begin();
@@ -848,7 +849,7 @@ bool MinimumTerminalSpanningTree::connectsWithoutBend(VertInf *oldLeaf,
{
continue;
}
-
+
if (other->point == oldLeaf->point)
{
continue;
@@ -888,8 +889,8 @@ void MinimumTerminalSpanningTree::rewriteRestOfHyperedge(VertInf *vert,
vert->setTreeRootPointer(newTreeRootPtr);
LayeredOrthogonalEdgeList edgeList = getOrthogonalEdgesFromVertex(vert,
- NULL);
- for (LayeredOrthogonalEdgeList::const_iterator edge = edgeList.begin();
+ nullptr);
+ for (LayeredOrthogonalEdgeList::const_iterator edge = edgeList.begin();
edge != edgeList.end(); ++edge)
{
VertInf *v = edge->second;
@@ -911,33 +912,32 @@ void MinimumTerminalSpanningTree::rewriteRestOfHyperedge(VertInf *vert,
void MinimumTerminalSpanningTree::drawForest(VertInf *vert, VertInf *prev)
{
- if (prev == NULL)
+ if (prev == nullptr)
{
- char colour[40];
- strcpy(colour, "green");
+ std::string colour = "green";
/*
if (vert->id == dimensionChangeVertexID)
{
- strcpy(colour, "blue");
+ colour = "blue";
}
*/
- if (vert->treeRoot() == NULL)
+ if (vert->treeRoot() == nullptr)
{
- strcpy(colour, "red");
+ colour = "red";
}
- COLA_ASSERT(vert->treeRootPointer() != NULL);
- COLA_ASSERT(vert->treeRoot() != NULL);
+ COLA_ASSERT(vert->treeRootPointer() != nullptr);
+ COLA_ASSERT(vert->treeRoot() != nullptr);
//fprintf(debug_fp, "<circle cx=\"%g\" cy=\"%g\" r=\"3\" db:sptfDist=\"%g\" "
// "style=\"fill: %s; stroke: %s; fill-opacity: 0.5; "
// "stroke-width: 1px; stroke-opacity:0.5\" />\n",
- // vert->point.x, vert->point.y, vert->sptfDist, colour, "black");
+ // vert->point.x, vert->point.y, vert->sptfDist, colour.c_str(), "black");
}
-
+
LayeredOrthogonalEdgeList edgeList = getOrthogonalEdgesFromVertex(vert,
prev);
- for (LayeredOrthogonalEdgeList::const_iterator edge = edgeList.begin();
+ for (LayeredOrthogonalEdgeList::const_iterator edge = edgeList.begin();
edge != edgeList.end(); ++edge)
{
VertInf *v = edge->second;
@@ -969,9 +969,9 @@ VertexPair MinimumTerminalSpanningTree::
VertexPair realVertices = std::make_pair(v1, v2);
- if ((v1->id != dimensionChangeVertexID) &&
- (v2->id != dimensionChangeVertexID) &&
- (v1->point != v2->point) &&
+ if ((v1->id != dimensionChangeVertexID) &&
+ (v2->id != dimensionChangeVertexID) &&
+ (v1->point != v2->point) &&
(v1->point.x == v2->point.x))
{
if (v1->m_orthogonalPartner)
@@ -996,14 +996,14 @@ void MinimumTerminalSpanningTree::commitToBridgingEdge(EdgeInf *e)
// Connect this edge into the MTST by building HyperedgeTree nodes
// and edges for this edge and the path back to the tree root.
- HyperedgeTreeNode *node1 = NULL;
- HyperedgeTreeNode *node2 = NULL;
+ HyperedgeTreeNode *node1 = nullptr;
+ HyperedgeTreeNode *node2 = nullptr;
VertInf *vert1 = ends.first;
VertInf *vert2 = ends.second;
if (hyperedgeTreeJunctions)
{
- node1 = addNode(vert1, NULL);
+ node1 = addNode(vert1, nullptr);
node2 = addNode(vert2, node1);
e->setHyperedgeSegment(true);
}
@@ -1015,7 +1015,7 @@ void MinimumTerminalSpanningTree::commitToBridgingEdge(EdgeInf *e)
for (std::set<VertInf *>::iterator ti = terminals.begin();
ti != terminals.end(); ++ti)
{
- drawForest(*ti, NULL);
+ drawForest(*ti, nullptr);
}
}
#endif
@@ -1027,7 +1027,7 @@ void MinimumTerminalSpanningTree::commitToBridgingEdge(EdgeInf *e)
// path terminal forests from the roots of that path. We do this by
// rewriting the treeRootPointers for all the points on the current
// hyperedge path to newTreeRootPtr. The rest of the vertices in the
- // forest will be pruned by rewriting their treeRootPointer to NULL.
+ // forest will be pruned by rewriting their treeRootPointer to nullptr.
VertInf **oldTreeRootPtr1 = vert1->treeRootPointer();
VertInf **oldTreeRootPtr2 = vert2->treeRootPointer();
origTerminals.erase(oldRoot);
@@ -1042,11 +1042,11 @@ void MinimumTerminalSpanningTree::commitToBridgingEdge(EdgeInf *e)
resetDistsForPath(vert2, newTreeRootPtr);
// Prune the forests from the joined vertex sets by setting their
- // treeRootPointers to NULL.
+ // treeRootPointers to nullptr.
COLA_ASSERT(oldTreeRootPtr1);
COLA_ASSERT(oldTreeRootPtr2);
- *oldTreeRootPtr1 = NULL;
- *oldTreeRootPtr2 = NULL;
+ *oldTreeRootPtr1 = nullptr;
+ *oldTreeRootPtr2 = nullptr;
// We have found the full hyperedge path when we have joined all the
// terminal sets into one.
@@ -1064,7 +1064,7 @@ void MinimumTerminalSpanningTree::commitToBridgingEdge(EdgeInf *e)
{
VertInf *v = vHeap[i];
- if ((v->treeRoot() == NULL))
+ if ((v->treeRoot() == nullptr))
{
// This is an orphaned vertex.
continue;
@@ -1079,17 +1079,16 @@ void MinimumTerminalSpanningTree::commitToBridgingEdge(EdgeInf *e)
vHeap = vHeapNew;
// Reset all terminals to zero.
- for (std::set<VertInf *>::iterator v2 = terminals.begin();
+ for (std::set<VertInf *>::iterator v2 = terminals.begin();
v2 != terminals.end(); ++v2)
{
COLA_ASSERT((*v2)->sptfDist == 0);
vHeap.push_back(*v2);
}
- // Rebuild the heap since some terminals will have had distances
+ // Rebuild the heap since some terminals will have had distances
// rewritten as well as the orphaned vertices being removed.
std::make_heap(vHeap.begin(), vHeap.end(), vHeapCompare);
}
}
-
diff --git a/src/3rdparty/adaptagrams/libavoid/mtst.h b/src/3rdparty/adaptagrams/libavoid/mtst.h
index bf9e2b07c..3789ad412 100644
--- a/src/3rdparty/adaptagrams/libavoid/mtst.h
+++ b/src/3rdparty/adaptagrams/libavoid/mtst.h
@@ -68,7 +68,7 @@ class MinimumTerminalSpanningTree
public:
MinimumTerminalSpanningTree(Router *router,
std::set<VertInf *> terminals,
- JunctionHyperedgeTreeNodeMap *hyperedgeTreeJunctions = NULL);
+ JunctionHyperedgeTreeNodeMap *hyperedgeTreeJunctions = nullptr);
~MinimumTerminalSpanningTree();
// Uses Interleaved construction of the MTST and SPTF (heuristic 2
diff --git a/src/3rdparty/adaptagrams/libavoid/obstacle.cpp b/src/3rdparty/adaptagrams/libavoid/obstacle.cpp
index 06eadde26..ac7139b3b 100644
--- a/src/3rdparty/adaptagrams/libavoid/obstacle.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/obstacle.cpp
@@ -35,18 +35,18 @@ Obstacle::Obstacle(Router *router, Polygon ply, const unsigned int id)
: m_router(router),
m_polygon(ply),
m_active(false),
- m_first_vert(NULL),
- m_last_vert(NULL)
+ m_first_vert(nullptr),
+ m_last_vert(nullptr)
{
- COLA_ASSERT(m_router != NULL);
+ COLA_ASSERT(m_router != nullptr);
m_id = m_router->assignId(id);
VertID i = VertID(m_id, 0);
Polygon routingPoly = routingPolygon();
const bool addToRouterNow = false;
- VertInf *last = NULL;
- VertInf *node = NULL;
+ VertInf *last = nullptr;
+ VertInf *node = nullptr;
for (size_t pt_i = 0; pt_i < routingPoly.size(); ++pt_i)
{
node = new VertInf(m_router, i, routingPoly.ps[pt_i], addToRouterNow);
@@ -76,7 +76,7 @@ Obstacle::Obstacle(Router *router, Polygon ply, const unsigned int id)
Obstacle::~Obstacle()
{
COLA_ASSERT(m_active == false);
- COLA_ASSERT(m_first_vert != NULL);
+ COLA_ASSERT(m_first_vert != nullptr);
VertInf *it = m_first_vert;
do
@@ -87,7 +87,7 @@ Obstacle::~Obstacle()
delete tmp;
}
while (it != m_first_vert);
- m_first_vert = m_last_vert = NULL;
+ m_first_vert = m_last_vert = nullptr;
// Free and clear any connection pins.
while (!m_connection_pins.empty())
@@ -99,7 +99,7 @@ Obstacle::~Obstacle()
void Obstacle::setNewPoly(const Polygon& poly)
{
- COLA_ASSERT(m_first_vert != NULL);
+ COLA_ASSERT(m_first_vert != nullptr);
COLA_ASSERT(m_polygon.size() == poly.size());
m_polygon = poly;
@@ -113,7 +113,7 @@ void Obstacle::setNewPoly(const Polygon& poly)
// Reset with the new polygon point.
curr->Reset(routingPoly.ps[pt_i]);
- curr->pathNext = NULL;
+ curr->pathNext = nullptr;
curr = curr->shNext;
}
@@ -321,7 +321,7 @@ VertInf *Obstacle::getPointVertex(const Point& point)
}
while (curr != m_first_vert);
- return NULL;
+ return nullptr;
}
@@ -344,7 +344,7 @@ ConnRefList Obstacle::attachedConnectors(void) const
curr != m_following_conns.end(); ++curr)
{
ConnEnd *connEnd = *curr;
- COLA_ASSERT(connEnd->m_conn_ref != NULL);
+ COLA_ASSERT(connEnd->m_conn_ref != nullptr);
attachedConns.push_back(connEnd->m_conn_ref);
}
return attachedConns;
diff --git a/src/3rdparty/adaptagrams/libavoid/orthogonal.cpp b/src/3rdparty/adaptagrams/libavoid/orthogonal.cpp
index 2558e0d73..f213955f6 100644
--- a/src/3rdparty/adaptagrams/libavoid/orthogonal.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/orthogonal.cpp
@@ -12,12 +12,12 @@
* See the file LICENSE.LGPL distributed with the library.
*
* Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
+ * accordance with the commercial license agreement provided with the
* library.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Author(s): Michael Wybrow
*/
@@ -103,7 +103,7 @@ class CmpIndexes
}
bool operator()(size_t lhs, size_t rhs)
{
- return connRef->displayRoute().ps[lhs][dimension] <
+ return connRef->displayRoute().ps[lhs][dimension] <
connRef->displayRoute().ps[rhs][dimension];
}
private:
@@ -116,12 +116,12 @@ class NudgingShiftSegment : public ShiftSegment
{
public:
// For shiftable segments.
- NudgingShiftSegment(ConnRef *conn, const size_t low, const size_t high,
+ NudgingShiftSegment(ConnRef *conn, const size_t low, const size_t high,
bool isSBend, bool isZBend, const size_t dim, double minLim,
double maxLim)
: ShiftSegment(dim),
connRef(conn),
- variable(NULL),
+ variable(nullptr),
fixed(false),
finalSegment(false),
endsInShape(false),
@@ -135,11 +135,11 @@ class NudgingShiftSegment : public ShiftSegment
maxSpaceLimit = maxLim;
}
// For fixed segments.
- NudgingShiftSegment(ConnRef *conn, const size_t low, const size_t high,
+ NudgingShiftSegment(ConnRef *conn, const size_t low, const size_t high,
const size_t dim)
: ShiftSegment(dim),
connRef(conn),
- variable(NULL),
+ variable(nullptr),
fixed(true),
finalSegment(false),
endsInShape(false),
@@ -168,7 +168,7 @@ class NudgingShiftSegment : public ShiftSegment
{
return connRef->displayRoute().ps[indexes.front()];
}
- const Point& highPoint(void) const
+ const Point& highPoint(void) const
{
return connRef->displayRoute().ps[indexes.back()];
}
@@ -190,14 +190,14 @@ class NudgingShiftSegment : public ShiftSegment
if (nudgeFinalSegments && finalSegment)
{
weight = strongWeight;
-
+
if (singleConnectedSegment && !justUnifying)
{
// This is a single segment connector bridging
// two shapes. So, we want to try to keep it
// centred rather than shift it.
- // Don't do this during Unifying stage, or else
- // these connectors could end up at slightly
+ // Don't do this during Unifying stage, or else
+ // these connectors could end up at slightly
// different positions and get the wrong ordering
// for nudging.
weight = strongerWeight;
@@ -211,7 +211,7 @@ class NudgingShiftSegment : public ShiftSegment
{
COLA_ASSERT(minSpaceLimit > -CHANNEL_MAX);
COLA_ASSERT(maxSpaceLimit < CHANNEL_MAX);
-
+
// For zigzag bends, take the middle as ideal.
varPos = minSpaceLimit + ((maxSpaceLimit - minSpaceLimit) / 2);
}
@@ -223,7 +223,7 @@ class NudgingShiftSegment : public ShiftSegment
}
else if ( ! finalSegment )
{
- // Set a higher weight for c-bends to stop them sometimes
+ // Set a higher weight for c-bends to stop them sometimes
// getting pushed out into channels by more-free connectors
// to the "inner" side of them.
weight = strongWeight;
@@ -269,7 +269,7 @@ class NudgingShiftSegment : public ShiftSegment
double pos = lowPoint()[dimension];
bool minLimited = ((pos - minSpaceLimit) < nudgeDist);
bool maxLimited = ((maxSpaceLimit - pos) < nudgeDist);
-
+
if (fixed || (minLimited && maxLimited))
{
isFixed = true;
@@ -305,7 +305,7 @@ class NudgingShiftSegment : public ShiftSegment
// overlapping. This allows them to be nudged apart where possible.
bool overlapsWith(const ShiftSegment *rhsSuper, const size_t dim) const
{
- const NudgingShiftSegment *rhs =
+ const NudgingShiftSegment *rhs =
static_cast<const NudgingShiftSegment *> (rhsSuper);
size_t altDim = (dim + 1) % 2;
const Point& lowPt = lowPoint();
@@ -322,7 +322,7 @@ class NudgingShiftSegment : public ShiftSegment
return true;
}
}
- else if ( (lowPt[altDim] == rhsHighPt[altDim]) ||
+ else if ( (lowPt[altDim] == rhsHighPt[altDim]) ||
(rhsLowPt[altDim] == highPt[altDim]) )
{
bool nudgeColinearSegments = connRef->router()->routingOption(
@@ -337,14 +337,14 @@ class NudgingShiftSegment : public ShiftSegment
{
// If we are routing with a fixedSharedPathPenalty
// then we don't want these segments to ever touch
- // or slide past each other, so they are always
+ // or slide past each other, so they are always
// considered to be overlapping.
return true;
}
else if ((rhs->sBend && sBend) || (rhs->zBend && zBend))
{
- // Count them as overlapping for nudging if they
- // are both s-bends or both z-bends, i.e., when
+ // Count them as overlapping for nudging if they
+ // are both s-bends or both z-bends, i.e., when
// the ordering would matter.
return nudgeColinearSegments;
}
@@ -358,7 +358,7 @@ class NudgingShiftSegment : public ShiftSegment
return false;
}
// These segments are allowed to drift into alignment but don't have to.
- bool canAlignWith(const NudgingShiftSegment *rhs,
+ bool canAlignWith(const NudgingShiftSegment *rhs,
const size_t dim) const
{
COLA_UNUSED(dim);
@@ -367,9 +367,9 @@ class NudgingShiftSegment : public ShiftSegment
{
return false;
}
-
+
// Don't allow segments of the same connector to drift together
- // where one of them goes via a checkpoint. We want the path
+ // where one of them goes via a checkpoint. We want the path
// through the checkpoint to be maintained.
bool hasCheckpoints = checkpoints.size() > 0;
bool rhsHasCheckpoints = rhs->checkpoints.size() > 0;
@@ -380,17 +380,17 @@ class NudgingShiftSegment : public ShiftSegment
return true;
}
// These segments should align with each other.
- bool shouldAlignWith(const ShiftSegment *rhsSuper,
+ bool shouldAlignWith(const ShiftSegment *rhsSuper,
const size_t dim) const
{
- const NudgingShiftSegment *rhs =
+ const NudgingShiftSegment *rhs =
static_cast<const NudgingShiftSegment *> (rhsSuper);
- if ((connRef == rhs->connRef) && finalSegment &&
+ if ((connRef == rhs->connRef) && finalSegment &&
rhs->finalSegment && overlapsWith(rhs, dim))
{
// If both the segments are in shapes then we know limits
- // and can align. Otherwise we do this just for segments
- // that are very close together, since these will often
+ // and can align. Otherwise we do this just for segments
+ // that are very close together, since these will often
// prevent nudging, or force it to have a tiny separation
// value.
if ((endsInShape && rhs->endsInShape) ||
@@ -399,7 +399,7 @@ class NudgingShiftSegment : public ShiftSegment
return true;
}
}
- else if ((connRef == rhs->connRef) &&
+ else if ((connRef == rhs->connRef) &&
// Not both final
((finalSegment & rhs->finalSegment) != true))
{
@@ -426,10 +426,10 @@ class NudgingShiftSegment : public ShiftSegment
}
// We should align these so long as they are close
- // together (<= 10) and there isn't a checkpoint at the
- // touch point, i.e., we'd be altering the edges leading
- // into the checkpoint. We want to keep these in place
- // and opportunistically move other edges to align with
+ // together (<= 10) and there isn't a checkpoint at the
+ // touch point, i.e., we'd be altering the edges leading
+ // into the checkpoint. We want to keep these in place
+ // and opportunistically move other edges to align with
// them.
return couldTouch && (space <= 10) &&
!hasCheckpointAtPosition(touchPos, altDim) &&
@@ -445,7 +445,7 @@ class NudgingShiftSegment : public ShiftSegment
// Adjust limits.
minSpaceLimit = std::max(minSpaceLimit, rhsSuper->minSpaceLimit);
maxSpaceLimit = std::min(maxSpaceLimit, rhsSuper->maxSpaceLimit);
-
+
// Find a new position for the segment, taking into account
// the two original positions and the combined limits.
double segmentPos = lowPoint()[dimension];
@@ -462,7 +462,7 @@ class NudgingShiftSegment : public ShiftSegment
segmentPos = std::min(maxSpaceLimit, segmentPos);
// Merge the index lists and sort the new list.
- const NudgingShiftSegment *rhs =
+ const NudgingShiftSegment *rhs =
static_cast<const NudgingShiftSegment *> (rhsSuper);
indexes.insert(indexes.end(), rhs->indexes.begin(), rhs->indexes.end());
size_t altDim = (dim + 1) % 2;
@@ -476,7 +476,7 @@ class NudgingShiftSegment : public ShiftSegment
connRef->displayRoute().ps[index][dimension] = segmentPos;
}
}
- bool hasCheckpointAtPosition(const double position,
+ bool hasCheckpointAtPosition(const double position,
const size_t dim) const
{
for (size_t cp = 0; cp < checkpoints.size(); ++cp)
@@ -504,7 +504,7 @@ class NudgingShiftSegment : public ShiftSegment
{
// This is true if this is a cBend and its adjoining points
// are at lower positions.
- if (!finalSegment && !zigzag() && !fixed &&
+ if (!finalSegment && !zigzag() && !fixed &&
(minSpaceLimit == lowPoint()[dimension]))
{
return true;
@@ -515,7 +515,7 @@ class NudgingShiftSegment : public ShiftSegment
{
// This is true if this is a cBend and its adjoining points
// are at higher positions.
- if (!finalSegment && !zigzag() && !fixed &&
+ if (!finalSegment && !zigzag() && !fixed &&
(maxSpaceLimit == lowPoint()[dimension]))
{
return true;
@@ -535,8 +535,8 @@ typedef unsigned int ScanVisDirFlags;
// Returns a bitfield of the directions of visibility in terms of the scanline
-// in a particular dimension dimension. It will return either ConnDirDown
-// (meaning visibility to lower position values) or ConnDirUp (for visibility
+// in a particular dimension dimension. It will return either ConnDirDown
+// (meaning visibility to lower position values) or ConnDirUp (for visibility
// towards higher position values).
//
static ScanVisDirFlags getPosVertInfDirections(VertInf *v, size_t dim)
@@ -566,16 +566,16 @@ static ScanVisDirFlags getPosVertInfDirections(VertInf *v, size_t dim)
}
else if (dirs == ConnDirDown)
{
- // libavoid's Y-axis points downwards, so where the user has
+ // libavoid's Y-axis points downwards, so where the user has
// specified visibility downwards, this results in visibility to
- // higher scanline positition values.
+ // higher scanline positition values.
return VisDirUp;
}
else if (dirs == ConnDirUp)
{
- // libavoid's Y-axis points downwards, so where the user has
+ // libavoid's Y-axis points downwards, so where the user has
// specified visibility upwards, this results in visibility to
- // lower scanline positition values.
+ // lower scanline positition values.
return VisDirDown;
}
}
@@ -593,8 +593,8 @@ struct PosVertInf
dirs(d)
{
}
-
- bool operator<(const PosVertInf& rhs) const
+
+ bool operator<(const PosVertInf& rhs) const
{
if (pos != rhs.pos)
{
@@ -602,7 +602,7 @@ struct PosVertInf
}
if ((vert->id == rhs.vert->id) && (vert->id == dummyOrthogID))
{
- // Multiple dummy nodes can get placed at the same point for
+ // Multiple dummy nodes can get placed at the same point for
// multiple ShapeConnectionPins on junctions (outside of shapes).
// We only need one at each position, so multiples can be seen
// as equal here.
@@ -619,7 +619,7 @@ struct PosVertInf
VertInf *vert;
// A bitfield marking the direction of visibility (in this dimension)
- // made up of VisDirDown (for visibility towards lower position values)
+ // made up of VisDirDown (for visibility towards lower position values)
// and VisDirUp (for visibility towards higher position values).
//
ScanVisDirFlags dirs;
@@ -627,7 +627,7 @@ struct PosVertInf
struct CmpVertInf
-{
+{
bool operator()(const VertInf* u, const VertInf* v) const
{
// Comparator for VertSet, an ordered set of VertInf pointers.
@@ -650,17 +650,17 @@ struct CmpVertInf
typedef std::set<VertInf *, CmpVertInf> VertSet;
-// A set of points to break the line segment,
+// A set of points to break the line segment,
// along with vertices for these points.
typedef std::set<PosVertInf> BreakpointSet;
-// Temporary structure used to store the possible horizontal visibility
+// Temporary structure used to store the possible horizontal visibility
// lines arising from the vertical sweep.
-class LineSegment
+class LineSegment
{
public:
- LineSegment(const double& b, const double& f, const double& p,
- bool ss = false, VertInf *bvi = NULL, VertInf *fvi = NULL)
+ LineSegment(const double& b, const double& f, const double& p,
+ bool ss = false, VertInf *bvi = nullptr, VertInf *fvi = nullptr)
: begin(b),
finish(f),
pos(p),
@@ -677,7 +677,7 @@ public:
vertInfs.insert(fvi);
}
}
- LineSegment(const double& bf, const double& p, VertInf *bfvi = NULL)
+ LineSegment(const double& bf, const double& p, VertInf *bfvi = nullptr)
: begin(bf),
finish(bf),
pos(p),
@@ -688,9 +688,9 @@ public:
vertInfs.insert(bfvi);
}
}
-
+
// Order by begin, pos, finish.
- bool operator<(const LineSegment& rhs) const
+ bool operator<(const LineSegment& rhs) const
{
if (begin != rhs.begin)
{
@@ -716,7 +716,7 @@ public:
// Lines are exactly equal.
return true;
}
-
+
if (pos == rhs.pos)
{
if (((begin >= rhs.begin) && (begin <= rhs.finish)) ||
@@ -735,12 +735,12 @@ public:
finish = std::max(finish, segment.finish);
vertInfs.insert(segment.vertInfs.begin(), segment.vertInfs.end());
}
-
+
VertInf *beginVertInf(void) const
{
if (vertInfs.empty())
{
- return NULL;
+ return nullptr;
}
VertInf *inf = *vertInfs.begin();
if ( ((inf->point.y == begin) && (inf->point.x == pos)) ||
@@ -749,13 +749,13 @@ public:
// Only return the point if it is actually at the begin pos.
return inf;
}
- return NULL;
+ return nullptr;
}
VertInf *finishVertInf(void) const
{
if (vertInfs.empty())
{
- return NULL;
+ return nullptr;
}
VertInf *inf = *vertInfs.rbegin();
if ( ((inf->point.y == finish) && (inf->point.x == pos)) ||
@@ -764,12 +764,12 @@ public:
// Only return the point if it is actually at the finish pos.
return inf;
}
- return NULL;
+ return nullptr;
}
VertInf *commitPositionX(Router *router, double posX)
{
- VertInf *found = NULL;
+ VertInf *found = nullptr;
for (VertSet::iterator v = vertInfs.begin();
v != vertInfs.end(); ++v)
{
@@ -787,7 +787,7 @@ public:
return found;
}
// Set begin endpoint vertex if none has been assigned.
- void horiCommitBegin(Router *router, VertInf *vert = NULL)
+ void horiCommitBegin(Router *router, VertInf *vert = nullptr)
{
if (vert)
{
@@ -806,7 +806,7 @@ public:
}
// Set begin endpoint vertex if none has been assigned.
- void horiCommitFinish(Router *router, VertInf *vert = NULL)
+ void horiCommitFinish(Router *router, VertInf *vert = nullptr)
{
if (vert)
{
@@ -824,12 +824,12 @@ public:
}
}
- // Converts a section of the points list to a set of breakPoints.
+ // Converts a section of the points list to a set of breakPoints.
// Returns the first of the intersection points occurring at finishPos.
VertSet::iterator addSegmentsUpTo(double finishPos)
{
VertSet::iterator firstIntersectionPt = vertInfs.end();
- for (VertSet::iterator vert = vertInfs.begin();
+ for (VertSet::iterator vert = vertInfs.begin();
vert != vertInfs.end(); ++vert)
{
if ((*vert)->point.x > finishPos)
@@ -837,11 +837,11 @@ public:
// We're done.
break;
}
-
+
breakPoints.insert(PosVertInf((*vert)->point.x, (*vert),
getPosVertInfDirections(*vert, XDIM)));
- if ((firstIntersectionPt == vertInfs.end()) &&
+ if ((firstIntersectionPt == vertInfs.end()) &&
((*vert)->point.x == finishPos))
{
firstIntersectionPt = vert;
@@ -851,13 +851,13 @@ public:
return firstIntersectionPt;
}
- // Add visibility edge(s) for this segment. There may be multiple if
+ // Add visibility edge(s) for this segment. There may be multiple if
// one of the endpoints is shared by multiple connector endpoints.
void addEdgeHorizontal(Router *router)
{
horiCommitBegin(router);
horiCommitFinish(router);
-
+
addSegmentsUpTo(finish);
}
@@ -869,7 +869,7 @@ public:
// First, travel in one direction
bool seenConnPt = false;
bool seenShapeEdge = false;
- for (BreakpointSet::iterator nvert = breakPoints.begin();
+ for (BreakpointSet::iterator nvert = breakPoints.begin();
nvert != breakPoints.end(); ++nvert)
{
VertIDProps mask = 0;
@@ -909,7 +909,7 @@ public:
// Then in the other direction
seenConnPt = false;
seenShapeEdge = false;
- for (BreakpointSet::reverse_iterator rvert = breakPoints.rbegin();
+ for (BreakpointSet::reverse_iterator rvert = breakPoints.rbegin();
rvert != breakPoints.rend(); ++rvert)
{
VertIDProps mask = 0;
@@ -951,9 +951,9 @@ public:
// Add visibility edge(s) for this segment up until an intersection.
// Then, move the segment beginning to the intersection point, so we
// later only consider the remainder of the segment.
- // There may be multiple segments added to the graph if the beginning
+ // There may be multiple segments added to the graph if the beginning
// endpoint of the segment is shared by multiple connector endpoints.
- VertSet addEdgeHorizontalTillIntersection(Router *router,
+ VertSet addEdgeHorizontalTillIntersection(Router *router,
LineSegment& vertLine)
{
VertSet intersectionSet;
@@ -962,14 +962,14 @@ public:
// Does a vertex already exist for this point.
commitPositionX(router, vertLine.pos);
-
- // Generate segments and set end iterator to the first point
+
+ // Generate segments and set end iterator to the first point
// at the intersection position.
VertSet::iterator restBegin = addSegmentsUpTo(vertLine.pos);
// Add the intersections points to intersectionSet.
VertSet::iterator restEnd = restBegin;
- while ((restEnd != vertInfs.end()) &&
+ while ((restEnd != vertInfs.end()) &&
(*restEnd)->point.x == vertLine.pos)
{
++restEnd;
@@ -982,11 +982,11 @@ public:
return intersectionSet;
}
-
+
// Insert vertical breakpoints.
void insertBreakpointsBegin(Router *router, LineSegment& vertLine)
{
- VertInf *vert = NULL;
+ VertInf *vert = nullptr;
if (pos == vertLine.begin && vertLine.beginVertInf())
{
vert = vertLine.beginVertInf();
@@ -1002,7 +1002,7 @@ public:
{
if ((*v)->point.x == begin)
{
- vertLine.breakPoints.insert(PosVertInf(pos, *v,
+ vertLine.breakPoints.insert(PosVertInf(pos, *v,
getPosVertInfDirections(*v, YDIM)));
}
}
@@ -1011,7 +1011,7 @@ public:
// Insert vertical breakpoints.
void insertBreakpointsFinish(Router *router, LineSegment& vertLine)
{
- VertInf *vert = NULL;
+ VertInf *vert = nullptr;
if (pos == vertLine.begin && vertLine.beginVertInf())
{
vert = vertLine.beginVertInf();
@@ -1087,14 +1087,14 @@ public:
{
if (vert->vert->id == dummyOrthogID)
{
- if (last == breakPoints.end() ||
+ if (last == breakPoints.end() ||
(last->vert->point != vert->vert->point))
{
last = vert;
}
else
{
- // Already seen a dummy orthogonal point at this
+ // Already seen a dummy orthogonal point at this
// position, delete it.
}
@@ -1117,7 +1117,7 @@ public:
{
// Here we have a pair of two endpoints that are both
// connector endpoints and both are inside a shape.
-
+
// Give vert visibility back to the first non-connector
// endpoint vertex (i.e., the side of the shape).
BreakpointSet::iterator side = last;
@@ -1132,16 +1132,16 @@ public:
bool canSeeDown = (vert->dirs & VisDirDown);
if (canSeeDown && !(side->vert->id.isConnPt()))
{
- EdgeInf *edge = new
+ EdgeInf *edge = new
EdgeInf(side->vert, vert->vert, orthogonal);
- edge->setDist(vert->vert->point[dim] -
+ edge->setDist(vert->vert->point[dim] -
side->vert->point[dim]);
}
// Give last visibility back to the first non-connector
// endpoint vertex (i.e., the side of the shape).
side = vert;
- while ((side != breakPoints.end()) &&
+ while ((side != breakPoints.end()) &&
side->vert->id.isConnPt())
{
++side;
@@ -1149,17 +1149,17 @@ public:
bool canSeeUp = (last->dirs & VisDirUp);
if (canSeeUp && (side != breakPoints.end()))
{
- EdgeInf *edge = new
+ EdgeInf *edge = new
EdgeInf(last->vert, side->vert, orthogonal);
- edge->setDist(side->vert->point[dim] -
+ edge->setDist(side->vert->point[dim] -
last->vert->point[dim]);
}
}
-
+
// The normal case.
//
- // Note: It's okay to give two connector endpoints visibility
- // here since we only consider the partner endpoint as a
+ // Note: It's okay to give two connector endpoints visibility
+ // here since we only consider the partner endpoint as a
// candidate while searching if it is the other endpoint of
// the connector in question.
//
@@ -1178,9 +1178,9 @@ public:
}
if (generateEdge)
{
- EdgeInf *edge =
+ EdgeInf *edge =
new EdgeInf(last->vert, vert->vert, orthogonal);
- edge->setDist(vert->vert->point[dim] -
+ edge->setDist(vert->vert->point[dim] -
last->vert->point[dim]);
}
@@ -1197,7 +1197,7 @@ public:
}
else
{
- // vert has moved to the beginning of a group at a new
+ // vert has moved to the beginning of a group at a new
// position. Last is now in the right place, so do nothing.
}
}
@@ -1209,12 +1209,12 @@ public:
// XXX shapeSide is unused and could possibly be removed?
bool shapeSide;
-
+
VertSet vertInfs;
BreakpointSet breakPoints;
private:
- // MSVC wants to generate the assignment operator and the default
- // constructor, but fails. Therefore we declare them private and
+ // MSVC wants to generate the assignment operator and the default
+ // constructor, but fails. Therefore we declare them private and
// don't implement them.
LineSegment & operator=(LineSegment const &);
LineSegment();
@@ -1244,7 +1244,7 @@ class SegmentListWrapper
}
else
{
- // This is the first overlapping segment, so just
+ // This is the first overlapping segment, so just
// merge the new segment with this one.
curr->mergeVertInfs(segment);
found = curr;
@@ -1273,13 +1273,13 @@ class SegmentListWrapper
// Given a router instance and a set of possible horizontal segments, and a
// possible vertical visibility segment, compute and add edges to the
// orthogonal visibility graph for all the visibility edges.
-static void intersectSegments(Router *router, SegmentList& segments,
+static void intersectSegments(Router *router, SegmentList& segments,
LineSegment& vertLine)
{
// XXX: It seems that this case can sometimes occur... maybe when
// there are many overlapping rectangles.
- //COLA_ASSERT(vertLine.beginVertInf() == NULL);
- //COLA_ASSERT(vertLine.finishVertInf() == NULL);
+ //COLA_ASSERT(vertLine.beginVertInf() == nullptr);
+ //COLA_ASSERT(vertLine.finishVertInf() == nullptr);
COLA_ASSERT(!segments.empty());
for (SegmentList::iterator it = segments.begin(); it != segments.end(); )
@@ -1308,9 +1308,9 @@ static void intersectSegments(Router *router, SegmentList& segments,
{
// Add horizontal visibility segment.
horiLine.addEdgeHorizontal(router);
-
+
horiLine.insertBreakpointsFinish(router, vertLine);
-
+
size_t dim = XDIM; // x-dimension
horiLine.generateVisibilityEdgesFromBreakpointSet(router, dim);
@@ -1339,7 +1339,7 @@ static void intersectSegments(Router *router, SegmentList& segments,
if (inVertSegRegion)
{
// Add horizontal visibility segment.
- VertSet intersectionVerts =
+ VertSet intersectionVerts =
horiLine.addEdgeHorizontalTillIntersection(
router, vertLine);
@@ -1360,16 +1360,16 @@ static void intersectSegments(Router *router, SegmentList& segments,
}
-// Processes an event for the vertical sweep used for computing the static
-// orthogonal visibility graph. This adds possible horizontal visibility
+// Processes an event for the vertical sweep used for computing the static
+// orthogonal visibility graph. This adds possible horizontal visibility
// segments to the segments list.
// The first pass is adding the event to the scanline, the second is for
// processing the event and the third for removing it from the scanline.
-static void processEventVert(Router *router, NodeSet& scanline,
+static void processEventVert(Router *router, NodeSet& scanline,
SegmentListWrapper& segments, Event *e, unsigned int pass)
{
Node *v = e->v;
-
+
if ( ((pass == 1) && (e->type == Open)) ||
((pass == 2) && (e->type == ConnPoint)) )
{
@@ -1379,21 +1379,21 @@ static void processEventVert(Router *router, NodeSet& scanline,
NodeSet::iterator it = v->iter;
// Work out neighbours
- if (it != scanline.begin())
+ if (it != scanline.begin())
{
Node *u = *(--it);
v->firstAbove = u;
u->firstBelow = v;
}
it = v->iter;
- if (++it != scanline.end())
+ if (++it != scanline.end())
{
Node *u = *it;
v->firstBelow = u;
u->firstAbove = v;
}
}
-
+
if (pass == 2)
{
if ((e->type == Open) || (e->type == Close))
@@ -1415,23 +1415,23 @@ static void processEventVert(Router *router, NodeSet& scanline,
if (minLimitMax >= maxLimitMin)
{
// These vertices represent the shape corners.
- VertInf *vI1 = new VertInf(router, dummyOrthogShapeID,
+ VertInf *vI1 = new VertInf(router, dummyOrthogShapeID,
Point(minShape, lineY));
- VertInf *vI2 = new VertInf(router, dummyOrthogShapeID,
+ VertInf *vI2 = new VertInf(router, dummyOrthogShapeID,
Point(maxShape, lineY));
-
+
// There are no overlapping shapes, so give full visibility.
if (minLimit < minShape)
{
segments.insert(LineSegment(minLimit, minShape, lineY,
- true, NULL, vI1));
+ true, nullptr, vI1));
}
- segments.insert(LineSegment(minShape, maxShape, lineY,
+ segments.insert(LineSegment(minShape, maxShape, lineY,
true, vI1, vI2));
if (maxShape < maxLimit)
{
segments.insert(LineSegment(maxShape, maxLimit, lineY,
- true, vI2, NULL));
+ true, vI2, nullptr));
}
}
else
@@ -1443,7 +1443,7 @@ static void processEventVert(Router *router, NodeSet& scanline,
LineSegment *line = segments.insert(
LineSegment(minLimit, minLimitMax, lineY, true));
// Shape corner:
- VertInf *vI1 = new VertInf(router, dummyOrthogShapeID,
+ VertInf *vI1 = new VertInf(router, dummyOrthogShapeID,
Point(minShape, lineY));
line->vertInfs.insert(vI1);
}
@@ -1452,7 +1452,7 @@ static void processEventVert(Router *router, NodeSet& scanline,
LineSegment *line = segments.insert(
LineSegment(maxLimitMin, maxLimit, lineY, true));
// Shape corner:
- VertInf *vI2 = new VertInf(router, dummyOrthogShapeID,
+ VertInf *vI2 = new VertInf(router, dummyOrthogShapeID,
Point(maxShape, lineY));
line->vertInfs.insert(vI2);
}
@@ -1468,29 +1468,29 @@ static void processEventVert(Router *router, NodeSet& scanline,
double minLimit = v->firstPointAbove(XDIM);
double maxLimit = v->firstPointBelow(XDIM);
bool inShape = v->isInsideShape(XDIM);
-
+
// Insert if we have visibility in that direction and the segment
// length is greater than zero.
- LineSegment *line1 = NULL, *line2 = NULL;
+ LineSegment *line1 = nullptr, *line2 = nullptr;
if ((centreVert->visDirections & ConnDirLeft) && (minLimit < cp.x))
{
- line1 = segments.insert(LineSegment(minLimit, cp.x, e->pos,
- true, NULL, centreVert));
+ line1 = segments.insert(LineSegment(minLimit, cp.x, e->pos,
+ true, nullptr, centreVert));
}
if ((centreVert->visDirections & ConnDirRight) && (cp.x < maxLimit))
{
- line2 = segments.insert(LineSegment(cp.x, maxLimit, e->pos,
- true, centreVert, NULL));
+ line2 = segments.insert(LineSegment(cp.x, maxLimit, e->pos,
+ true, centreVert, nullptr));
// If there was a line1, then we just merged with it, so
// that pointer will be invalid (and now unnecessary).
- line1 = NULL;
+ line1 = nullptr;
}
if (!line1 && !line2)
{
// Add a point segment for the centre point.
segments.insert(LineSegment(cp.x, e->pos, centreVert));
}
-
+
if (!inShape)
{
// This is not contained within a shape so add a normal
@@ -1511,17 +1511,17 @@ static void processEventVert(Router *router, NodeSet& scanline,
}
}
}
-
+
if ( ((pass == 3) && (e->type == Close)) ||
((pass == 2) && (e->type == ConnPoint)) )
{
// Clean up neighbour pointers.
Node *l = v->firstAbove, *r = v->firstBelow;
- if (l != NULL)
+ if (l != nullptr)
{
l->firstBelow = v->firstBelow;
}
- if (r != NULL)
+ if (r != nullptr)
{
r->firstAbove = v->firstAbove;
}
@@ -1543,16 +1543,16 @@ static void processEventVert(Router *router, NodeSet& scanline,
}
-// Processes an event for the vertical sweep used for computing the static
-// orthogonal visibility graph. This adds possible vertical visibility
+// Processes an event for the vertical sweep used for computing the static
+// orthogonal visibility graph. This adds possible vertical visibility
// segments to the segments list.
// The first pass is adding the event to the scanline, the second is for
// processing the event and the third for removing it from the scanline.
-static void processEventHori(Router *router, NodeSet& scanline,
+static void processEventHori(Router *router, NodeSet& scanline,
SegmentListWrapper& segments, Event *e, unsigned int pass)
{
Node *v = e->v;
-
+
if ( ((pass == 1) && (e->type == Open)) ||
((pass == 2) && (e->type == ConnPoint)) )
{
@@ -1562,21 +1562,21 @@ static void processEventHori(Router *router, NodeSet& scanline,
NodeSet::iterator it = v->iter;
// Work out neighbours
- if (it != scanline.begin())
+ if (it != scanline.begin())
{
Node *u = *(--it);
v->firstAbove = u;
u->firstBelow = v;
}
it = v->iter;
- if (++it != scanline.end())
+ if (++it != scanline.end())
{
Node *u = *it;
v->firstBelow = u;
u->firstAbove = v;
}
}
-
+
if (pass == 2)
{
if ((e->type == Open) || (e->type == Close))
@@ -1600,9 +1600,9 @@ static void processEventHori(Router *router, NodeSet& scanline,
LineSegment(minLimit, maxLimit, lineX));
// Shape corners:
- VertInf *vI1 = new VertInf(router, dummyOrthogShapeID,
+ VertInf *vI1 = new VertInf(router, dummyOrthogShapeID,
Point(lineX, minShape));
- VertInf *vI2 = new VertInf(router, dummyOrthogShapeID,
+ VertInf *vI2 = new VertInf(router, dummyOrthogShapeID,
Point(lineX, maxShape));
line->vertInfs.insert(vI1);
line->vertInfs.insert(vI2);
@@ -1615,7 +1615,7 @@ static void processEventHori(Router *router, NodeSet& scanline,
LineSegment(minLimit, minLimitMax, lineX));
// Shape corner:
- VertInf *vI1 = new VertInf(router, dummyOrthogShapeID,
+ VertInf *vI1 = new VertInf(router, dummyOrthogShapeID,
Point(lineX, minShape));
line->vertInfs.insert(vI1);
}
@@ -1625,7 +1625,7 @@ static void processEventHori(Router *router, NodeSet& scanline,
LineSegment(maxLimitMin, maxLimit, lineX));
// Shape corner:
- VertInf *vI2 = new VertInf(router, dummyOrthogShapeID,
+ VertInf *vI2 = new VertInf(router, dummyOrthogShapeID,
Point(lineX, maxShape));
line->vertInfs.insert(vI2);
}
@@ -1640,7 +1640,7 @@ static void processEventHori(Router *router, NodeSet& scanline,
// As far as we can see.
double minLimit = v->firstPointAbove(YDIM);
double maxLimit = v->firstPointBelow(YDIM);
-
+
// Insert if we have visibility in that direction and the segment
// length is greater than zero.
if ((centreVert->visDirections & ConnDirUp) && (minLimit < cp.y))
@@ -1654,17 +1654,17 @@ static void processEventHori(Router *router, NodeSet& scanline,
}
}
}
-
+
if ( ((pass == 3) && (e->type == Close)) ||
((pass == 2) && (e->type == ConnPoint)) )
{
// Clean up neighbour pointers.
Node *l = v->firstAbove, *r = v->firstBelow;
- if (l != NULL)
+ if (l != nullptr)
{
l->firstBelow = v->firstBelow;
}
- if (r != NULL)
+ if (r != nullptr)
{
r->firstAbove = v->firstAbove;
}
@@ -1686,9 +1686,9 @@ static void processEventHori(Router *router, NodeSet& scanline,
}
// Correct visibility for pins or connector endpoints on the leading or
-// trailing edge of the visibility graph which may only have visibility in
+// trailing edge of the visibility graph which may only have visibility in
// the outward direction where there will not be a possible path.
-void fixConnectionPointVisibilityOnOutsideOfVisibilityGraph(Event **events,
+void fixConnectionPointVisibilityOnOutsideOfVisibilityGraph(Event **events,
size_t totalEvents, ConnDirFlags addedVisibility)
{
if (totalEvents > 0)
@@ -1782,8 +1782,8 @@ extern void generateStaticOrthogonalVisGraph(Router *router)
}
#endif
- for (VertInf *curr = router->vertices.connsBegin();
- curr && (curr != router->vertices.shapesBegin());
+ for (VertInf *curr = router->vertices.connsBegin();
+ curr && (curr != router->vertices.shapesBegin());
curr = curr->lstNext)
{
if (curr->visDirections == ConnDirNone)
@@ -1800,12 +1800,12 @@ extern void generateStaticOrthogonalVisGraph(Router *router)
events[ctr++] = new Event(ConnPoint, v, point.y);
}
qsort((Event*)events, (size_t) totalEvents, sizeof(Event*), compare_events);
-
+
// Correct visibility for pins or connector endpoints on the leading or
- // trailing edge of the visibility graph which may only have visibility in
+ // trailing edge of the visibility graph which may only have visibility in
// the outward direction where there will not be a possible path. We
// fix this by giving them visibility left and right.
- fixConnectionPointVisibilityOnOutsideOfVisibilityGraph(events, totalEvents,
+ fixConnectionPointVisibilityOnOutsideOfVisibilityGraph(events, totalEvents,
(ConnDirLeft | ConnDirRight));
// Process the vertical sweep -- creating cadidate horizontal edges.
@@ -1820,7 +1820,7 @@ extern void generateStaticOrthogonalVisGraph(Router *router)
{
// Progress reporting and continuation check.
router->performContinuationCheck(
- TransactionPhaseOrthogonalVisibilityGraphScanX,
+ TransactionPhaseOrthogonalVisibilityGraphScanX,
i, totalEvents);
// If we have finished the current scanline or all events, then we
@@ -1832,7 +1832,7 @@ extern void generateStaticOrthogonalVisGraph(Router *router)
{
for (unsigned j = posStartIndex; j < posFinishIndex; ++j)
{
- processEventVert(router, scanline, segments,
+ processEventVert(router, scanline, segments,
events[j], pass);
}
}
@@ -1847,7 +1847,7 @@ extern void generateStaticOrthogonalVisGraph(Router *router)
posStartIndex = i;
}
- // Do the first sweep event handling -- building the correct
+ // Do the first sweep event handling -- building the correct
// structure of the scanline.
const int pass = 1;
processEventVert(router, scanline, segments, events[i], pass);
@@ -1884,8 +1884,8 @@ extern void generateStaticOrthogonalVisGraph(Router *router)
++obstacleIt;
}
- for (VertInf *curr = router->vertices.connsBegin();
- curr && (curr != router->vertices.shapesBegin());
+ for (VertInf *curr = router->vertices.connsBegin();
+ curr && (curr != router->vertices.shapesBegin());
curr = curr->lstNext)
{
if (curr->visDirections == ConnDirNone)
@@ -1903,10 +1903,10 @@ extern void generateStaticOrthogonalVisGraph(Router *router)
qsort((Event*)events, (size_t) totalEvents, sizeof(Event*), compare_events);
// Correct visibility for pins or connector endpoints on the leading or
- // trailing edge of the visibility graph which may only have visibility in
+ // trailing edge of the visibility graph which may only have visibility in
// the outward direction where there will not be a possible path. We
// fix this by giving them visibility up and down.
- fixConnectionPointVisibilityOnOutsideOfVisibilityGraph(events, totalEvents,
+ fixConnectionPointVisibilityOnOutsideOfVisibilityGraph(events, totalEvents,
(ConnDirUp | ConnDirDown));
// Process the horizontal sweep -- creating vertical visibility edges.
@@ -1916,7 +1916,7 @@ extern void generateStaticOrthogonalVisGraph(Router *router)
{
// Progress reporting and continuation check.
router->performContinuationCheck(
- TransactionPhaseOrthogonalVisibilityGraphScanY,
+ TransactionPhaseOrthogonalVisibilityGraphScanY,
i, totalEvents);
// If we have finished the current scanline or all events, then we
@@ -1928,11 +1928,11 @@ extern void generateStaticOrthogonalVisGraph(Router *router)
{
for (unsigned j = posStartIndex; j < posFinishIndex; ++j)
{
- processEventHori(router, scanline, vertSegments,
+ processEventHori(router, scanline, vertSegments,
events[j], pass);
}
}
-
+
// Process the merged line segments.
vertSegments.list().sort();
for (SegmentList::iterator curr = vertSegments.list().begin();
@@ -1952,7 +1952,7 @@ extern void generateStaticOrthogonalVisGraph(Router *router)
posStartIndex = i;
}
- // Do the first sweep event handling -- building the correct
+ // Do the first sweep event handling -- building the correct
// structure of the scanline.
const int pass = 1;
processEventHori(router, scanline, vertSegments, events[i], pass);
@@ -1962,17 +1962,17 @@ extern void generateStaticOrthogonalVisGraph(Router *router)
{
delete events[i];
}
- delete [] events;
+ delete [] events;
// Add portions of horizontal lines that are after the final vertical
// position we considered.
- for (SegmentList::iterator it = segments.list().begin();
+ for (SegmentList::iterator it = segments.list().begin();
it != segments.list().end(); )
{
LineSegment& horiLine = *it;
horiLine.addEdgeHorizontal(router);
-
+
size_t dim = XDIM; // x-dimension
horiLine.generateVisibilityEdgesFromBreakpointSet(router, dim);
@@ -2012,22 +2012,22 @@ static bool insideRectBounds(const Point& point, const RectBounds& rectBounds)
}
-static void buildOrthogonalNudgingSegments(Router *router,
+static void buildOrthogonalNudgingSegments(Router *router,
const size_t dim, ShiftSegmentList& segmentList)
{
if (router->routingParameter(segmentPenalty) == 0)
{
// The nudging code assumes the routes are pretty optimal. This will
- // only be true if a segment penalty is set, so just return if this
+ // only be true if a segment penalty is set, so just return if this
// is not the case.
return;
}
- bool nudgeFinalSegments =
+ bool nudgeFinalSegments =
router->routingOption(nudgeOrthogonalSegmentsConnectedToShapes);
std::vector<RectBounds> shapeLimits;
if (nudgeFinalSegments)
{
- // If we're going to nudge final segments, then cache the shape
+ // If we're going to nudge final segments, then cache the shape
// rectangles to save us rebuilding them multiple times.
const size_t n = router->m_obstacles.size();
shapeLimits = std::vector<RectBounds>(n);
@@ -2058,15 +2058,15 @@ static void buildOrthogonalNudgingSegments(Router *router,
size_t altDim = (dim + 1) % 2;
// For each connector.
- for (ConnRefList::const_iterator curr = router->connRefs.begin();
- curr != router->connRefs.end(); ++curr)
+ for (ConnRefList::const_iterator curr = router->connRefs.begin();
+ curr != router->connRefs.end(); ++curr)
{
if ((*curr)->routingType() != ConnType_Orthogonal)
{
continue;
}
Polygon& displayRoute = (*curr)->displayRoute();
- // Determine all line segments that we are interested in shifting.
+ // Determine all line segments that we are interested in shifting.
// We don't consider the first or last segment of a path.
for (size_t i = 1; i < displayRoute.size(); ++i)
{
@@ -2075,29 +2075,29 @@ static void buildOrthogonalNudgingSegments(Router *router,
// It's a segment in the dimension we are processing,
size_t indexLow = i - 1;
size_t indexHigh = i;
- if (displayRoute.ps[i - 1][altDim] ==
+ if (displayRoute.ps[i - 1][altDim] ==
displayRoute.ps[i][altDim])
{
// This is a zero length segment, so ignore it.
continue;
}
- else if (displayRoute.ps[i - 1][altDim] >
+ else if (displayRoute.ps[i - 1][altDim] >
displayRoute.ps[i][altDim])
{
indexLow = i;
indexHigh = i - 1;
}
- // Find the checkpoints on the current segment and the
+ // Find the checkpoints on the current segment and the
// checkpoints on the adjoining segments that aren't on
// the corner (hence the +1 and -1 modifiers).
- std::vector<Point> checkpoints =
+ std::vector<Point> checkpoints =
displayRoute.checkpointsOnSegment(i - 1);
- std::vector<Point> prevCheckpoints =
+ std::vector<Point> prevCheckpoints =
displayRoute.checkpointsOnSegment(i - 2, -1);
- std::vector<Point> nextCheckpoints =
+ std::vector<Point> nextCheckpoints =
displayRoute.checkpointsOnSegment(i, +1);
- bool hasCheckpoints = (checkpoints.size() > 0);
+ bool hasCheckpoints = (checkpoints.size() > 0);
if (hasCheckpoints && !nudgeFinalSegments)
{
// This segment includes one of the routing
@@ -2108,40 +2108,40 @@ static void buildOrthogonalNudgingSegments(Router *router,
}
double thisPos = displayRoute.ps[i][dim];
-
+
if ((i == 1) || ((i + 1) == displayRoute.size()))
{
// Is first or last segment of route.
-
+
if (nudgeFinalSegments)
{
// Determine available space for nudging these
// final segments.
double minLim = -CHANNEL_MAX;
double maxLim = CHANNEL_MAX;
-
+
// If the position of the opposite end of the
// attached segment is within the shape boundaries
// then we want to use this as an ideal position
// for the segment.
- // Bitflags indicating whether this segment starts
+ // Bitflags indicating whether this segment starts
// and/or ends in a shape.
unsigned int endsInShapes = 0;
- // Also limit their movement to the edges of the
+ // Also limit their movement to the edges of the
// shapes they begin or end within.
for (size_t k = 0; k < shapeLimits.size(); ++k)
{
double shapeMin = shapeLimits[k].first[dim];
double shapeMax = shapeLimits[k].second[dim];
- if (insideRectBounds(displayRoute.ps[i - 1],
+ if (insideRectBounds(displayRoute.ps[i - 1],
shapeLimits[k]))
{
minLim = std::max(minLim, shapeMin);
maxLim = std::min(maxLim, shapeMax);
endsInShapes |= 0x01;
}
- if (insideRectBounds(displayRoute.ps[i],
+ if (insideRectBounds(displayRoute.ps[i],
shapeLimits[k]))
{
minLim = std::max(minLim, shapeMin);
@@ -2164,19 +2164,19 @@ static void buildOrthogonalNudgingSegments(Router *router,
if ((minLim == maxLim) || (*curr)->hasFixedRoute())
{
// Fixed.
- segmentList.push_back(new NudgingShiftSegment(*curr,
+ segmentList.push_back(new NudgingShiftSegment(*curr,
indexLow, indexHigh, dim));
}
else
{
// Shiftable.
NudgingShiftSegment *segment = new NudgingShiftSegment(
- *curr, indexLow, indexHigh, false, false, dim,
+ *curr, indexLow, indexHigh, false, false, dim,
minLim, maxLim);
segment->finalSegment = true;
segment->endsInShape = (endsInShapes > 0);
- if ((displayRoute.size() == 2) &&
- (endsInShapes = 0x11))
+ if ((displayRoute.size() == 2) &&
+ (endsInShapes == 0x11))
{
// This is a single segment connector bridging
// two shapes. So, we want to try to keep the
@@ -2188,14 +2188,14 @@ static void buildOrthogonalNudgingSegments(Router *router,
}
else
{
- // The first and last segment of a connector can't be
- // shifted. We call them fixed segments.
- segmentList.push_back(new NudgingShiftSegment(*curr,
+ // The first and last segment of a connector can't be
+ // shifted. We call them fixed segments.
+ segmentList.push_back(new NudgingShiftSegment(*curr,
indexLow, indexHigh, dim));
}
continue;
}
-
+
// The segment probably has space to be shifted.
double minLim = -CHANNEL_MAX;
@@ -2238,7 +2238,7 @@ static void buildOrthogonalNudgingSegments(Router *router,
if (checkpoints.empty())
{
// Segments with checkpoints are held in place, but for
- // other segments, we should limit their movement based
+ // other segments, we should limit their movement based
// on the limits of the segments at either end.
double prevPos = displayRoute.ps[i - 2][dim];
@@ -2246,8 +2246,8 @@ static void buildOrthogonalNudgingSegments(Router *router,
if ( ((prevPos < thisPos) && (nextPos > thisPos)) ||
((prevPos > thisPos) && (nextPos < thisPos)) )
{
- // Determine limits if the s-bend is not due to an
- // obstacle. In this case we need to limit the channel
+ // Determine limits if the s-bend is not due to an
+ // obstacle. In this case we need to limit the channel
// to the span of the adjoining segments to this one.
if ((prevPos < thisPos) && (nextPos > thisPos))
{
@@ -2279,7 +2279,7 @@ typedef std::vector<ConnRef *> ConnRefVector;
typedef std::vector<Polygon> RouteVector;
-class CmpLineOrder
+class CmpLineOrder
{
public:
CmpLineOrder(PtOrderMap& ord, const size_t dim)
@@ -2287,30 +2287,30 @@ class CmpLineOrder
dimension(dim)
{
}
- bool operator()(const ShiftSegment *lhsSuper,
+ bool operator()(const ShiftSegment *lhsSuper,
const ShiftSegment *rhsSuper,
- bool *comparable = NULL) const
+ bool *comparable = nullptr) const
{
- const NudgingShiftSegment *lhs =
+ const NudgingShiftSegment *lhs =
static_cast<const NudgingShiftSegment *> (lhsSuper);
- const NudgingShiftSegment *rhs =
+ const NudgingShiftSegment *rhs =
static_cast<const NudgingShiftSegment *> (rhsSuper);
if (comparable)
{
*comparable = true;
}
- Point lhsLow = lhs->lowPoint();
- Point rhsLow = rhs->lowPoint();
+ Point lhsLow = lhs->lowPoint();
+ Point rhsLow = rhs->lowPoint();
size_t altDim = (dimension + 1) % 2;
#ifndef NDEBUG
- const Point& lhsHigh = lhs->highPoint();
- const Point& rhsHigh = rhs->highPoint();
+ const Point& lhsHigh = lhs->highPoint();
+ const Point& rhsHigh = rhs->highPoint();
COLA_ASSERT(lhsLow[dimension] == lhsHigh[dimension]);
COLA_ASSERT(rhsLow[dimension] == rhsHigh[dimension]);
#endif
- // We consider things at effectively the same position to
- // be ordered based on their order and fixedOrder, so only
+ // We consider things at effectively the same position to
+ // be ordered based on their order and fixedOrder, so only
// compare segments further apart than the nudgeDistance.
if (lhsLow[dimension] != rhsLow[dimension])
{
@@ -2318,7 +2318,7 @@ class CmpLineOrder
}
// If one of these is fixed, then determine order based on
- // fixed segment, that is, order so the fixed segment doesn't
+ // fixed segment, that is, order so the fixed segment doesn't
// block movement.
bool oneIsFixed = false;
const int lhsFixedOrder = lhs->fixedOrder(oneIsFixed);
@@ -2328,8 +2328,8 @@ class CmpLineOrder
return lhsFixedOrder < rhsFixedOrder;
}
- // C-bends that did not have a clear order with s-bends might
- // not have a good ordering here, so compare their order in
+ // C-bends that did not have a clear order with s-bends might
+ // not have a good ordering here, so compare their order in
// terms of C-bend direction and S-bends and use that if it
// differs for the two segments.
const int lhsOrder = lhs->order();
@@ -2338,7 +2338,7 @@ class CmpLineOrder
{
return lhsOrder < rhsOrder;
}
-
+
// Need to index using the original point into the map, so find it.
Point& unchanged = (lhsLow[altDim] > rhsLow[altDim]) ?
lhsLow : rhsLow;
@@ -2350,7 +2350,7 @@ class CmpLineOrder
{
// A value for rhsPos or lhsPos mean the points are not directly
// comparable, meaning they are at the same position but cannot
- // overlap (they are just collinear. The relative order for
+ // overlap (they are just collinear. The relative order for
// these segments is not important since we do not constrain
// them against each other.
//COLA_ASSERT(lhs->overlapsWith(rhs, dimension) == false);
@@ -2369,13 +2369,13 @@ class CmpLineOrder
};
-// We can't use the normal sort algorithm for lists since it is not possible
-// to compare all elements, but there will be an ordering defined between
-// most of the elements. Hence we order these, using insertion sort, and
-// the case of them not being able to be compared is handled by not setting
+// We can't use the normal sort algorithm for lists since it is not possible
+// to compare all elements, but there will be an ordering defined between
+// most of the elements. Hence we order these, using insertion sort, and
+// the case of them not being able to be compared is handled by not setting
// up any constraints between such segments when doing the nudging.
//
-static ShiftSegmentList linesort(bool nudgeFinalSegments,
+static ShiftSegmentList linesort(bool nudgeFinalSegments,
ShiftSegmentList origList, CmpLineOrder& comparison)
{
// Cope with end segments that are getting moved and will line up with
@@ -2389,11 +2389,11 @@ static ShiftSegmentList linesort(bool nudgeFinalSegments,
for (ShiftSegmentList::iterator otherSegIt = currSegIt;
otherSegIt != origList.end(); )
{
- NudgingShiftSegment *currSeg =
+ NudgingShiftSegment *currSeg =
static_cast<NudgingShiftSegment *> (*currSegIt);
- NudgingShiftSegment *otherSeg =
+ NudgingShiftSegment *otherSeg =
static_cast<NudgingShiftSegment *> (*otherSegIt);
- if ((currSegIt != otherSegIt) && currSeg && otherSeg &&
+ if ((currSegIt != otherSegIt) && currSeg && otherSeg &&
currSeg->shouldAlignWith(otherSeg, comparison.dimension))
{
currSeg->mergeWith(otherSeg, comparison.dimension);
@@ -2411,7 +2411,7 @@ static ShiftSegmentList linesort(bool nudgeFinalSegments,
ShiftSegmentList resultList;
size_t origListSize = origList.size();
- size_t deferredN = 0;
+ size_t deferredN = 0;
while (!origList.empty())
{
// Get and remove the first element from the origList.
@@ -2434,7 +2434,7 @@ static ShiftSegmentList linesort(bool nudgeFinalSegments,
break;
}
}
-
+
if (resultList.empty() || allComparable || (deferredN >= origListSize))
{
// Insert the element into the resultList at the required point.
@@ -2445,7 +2445,7 @@ static ShiftSegmentList linesort(bool nudgeFinalSegments,
}
else
{
- // This wasn't comparable to anything in the sorted list,
+ // This wasn't comparable to anything in the sorted list,
// so defer addition of the segment till later.
origList.push_back(segment);
deferredN++;
@@ -2738,9 +2738,9 @@ void ImproveOrthogonalRoutes::nudgeOrthogonalRoutes(size_t dimension,
continue;
}
- // The constraints generated here must be in order of
+ // The constraints generated here must be in order of
// leftBoundary-segment ... segment-segment ... segment-rightBoundary
- // since this order is leveraged later for rewriting the
+ // since this order is leveraged later for rewriting the
// separations of unsatisfable channel groups.
// Constrain to channel boundary.
@@ -2918,7 +2918,7 @@ void ImproveOrthogonalRoutes::nudgeOrthogonalRoutes(size_t dimension,
// There are no existing unsatisfied ranges,
// so start a new unsatisfied range.
// We are looking at a unsatisfied right side
- // where the left side was satisfied, so the
+ // where the left side was satisfied, so the
// range begins at the previous variable
// which should be a left channel side.
COLA_ASSERT(i > 0);
diff --git a/src/3rdparty/adaptagrams/libavoid/router.cpp b/src/3rdparty/adaptagrams/libavoid/router.cpp
index dee4d7681..f10e93310 100644
--- a/src/3rdparty/adaptagrams/libavoid/router.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/router.cpp
@@ -68,7 +68,7 @@ Router::Router(const unsigned int flags)
m_static_orthogonal_graph_invalidated(true),
m_in_crossing_rerouting_stage(false),
m_settings_changes(false),
- m_debug_handler(NULL)
+ m_debug_handler(nullptr)
{
// At least one of the Routing modes must be set.
COLA_ASSERT(flags & (PolyLineRouting | OrthogonalRouting));
@@ -170,7 +170,7 @@ ShapeRef *Router::shapeContainingPoint(const Point& point)
return shape;
}
}
- return NULL;
+ return nullptr;
}
void Router::modifyConnector(ConnRef *conn, const unsigned int type,
@@ -1131,7 +1131,7 @@ class CrossingConnectorsInfo
// For each crossing-causing connector.
ConnCostRef crossingCausingConnector;
while ( (crossingCausingConnector =
- removeConnectorWithMostCrossings(pairsSet)).second != NULL )
+ removeConnectorWithMostCrossings(pairsSet)).second != nullptr )
{
// Add it to our crossing-causing set.
crossingSet.insert(crossingCausingConnector);
@@ -1227,7 +1227,7 @@ class CrossingConnectorsInfo
CrossingConnectorsMap& pairsSet)
{
// Tracking of the greatest number of crossings.
- ConnRef *candidateConnector = NULL;
+ ConnRef *candidateConnector = nullptr;
size_t candidateCrossingCount = 0;
double candidateEstimatedCost = 0;
@@ -1258,10 +1258,10 @@ class CrossingConnectorsInfo
}
}
- if (candidateConnector == NULL)
+ if (candidateConnector == nullptr)
{
- // If no candidate, return NULL connector.
- return std::make_pair(0, (ConnRef *) NULL);
+ // If no candidate, return nullptr connector.
+ return std::make_pair(0, (ConnRef *) nullptr);
}
// Remove the candidate from the group. To do this we find the
@@ -1278,7 +1278,7 @@ class CrossingConnectorsInfo
connSet.clear();
// Return the candidate connector and its original crossing count.
- return std::make_pair(candidateCrossingCount, candidateConnector);
+ return std::make_pair(static_cast<double>(candidateCrossingCount), candidateConnector);
}
// Returns the iterator to the group that the given conn is in,
@@ -1657,7 +1657,7 @@ void Router::checkAllMissingEdges(void)
}
// See if the edge is already there?
- bool found = (EdgeInf::existingEdge(i, j) != NULL);
+ bool found = (EdgeInf::existingEdge(i, j) != nullptr);
if (!found)
{
@@ -2286,8 +2286,8 @@ int Router::existsCrossings(const bool optimisedForConnectorType)
{
// Determine if this pair overlap
Avoid::Polygon jRoute = (*j)->displayRoute();
- ConnRef *iConn = (optimisedForConnectorType) ? *i : NULL;
- ConnRef *jConn = (optimisedForConnectorType) ? *j : NULL;
+ ConnRef *iConn = (optimisedForConnectorType) ? *i : nullptr;
+ ConnRef *jConn = (optimisedForConnectorType) ? *j : nullptr;
ConnectorCrossings cross(iRoute, true, jRoute, iConn, jConn);
cross.checkForBranchingSegments = true;
for (size_t jInd = 1; jInd < jRoute.size(); ++jInd)
@@ -2369,7 +2369,7 @@ void Router::outputInstanceToSVG(std::string instanceName)
filename += ".svg";
FILE *fp = fopen(filename.c_str(), "w");
- if (fp == NULL)
+ if (fp == nullptr)
{
return;
}
@@ -2416,7 +2416,7 @@ void Router::outputInstanceToSVG(std::string instanceName)
// Output source code to generate this instance of the router.
fprintf(fp, "<!-- Source code to generate this instance:\n");
fprintf(fp, "#include \"libavoid/libavoid.h\"\n");
- if (m_topology_addon->outputCode(NULL))
+ if (m_topology_addon->outputCode(nullptr))
{
fprintf(fp, "#include \"libcola/cola.h\"\n");
fprintf(fp, "#include \"libtopology/orthogonal_topology.h\"\n");
@@ -2449,12 +2449,12 @@ void Router::outputInstanceToSVG(std::string instanceName)
(unsigned long)p, (m_routing_options[p]) ? "true" : "false");
}
fprintf(fp, " Polygon polygon;\n");
- fprintf(fp, " ConnRef *connRef = NULL;\n");
+ fprintf(fp, " ConnRef *connRef = nullptr;\n");
fprintf(fp, " ConnEnd srcPt;\n");
fprintf(fp, " ConnEnd dstPt;\n");
fprintf(fp, " ConnEnd heConnPt;\n");
fprintf(fp, " PolyLine newRoute;\n");
- fprintf(fp, " ShapeConnectionPin *connPin = NULL;\n");
+ fprintf(fp, " ShapeConnectionPin *connPin = nullptr;\n");
fprintf(fp, "\n");
ClusterRefList::reverse_iterator revClusterRefIt = clusterRefs.rbegin();
while (revClusterRefIt != clusterRefs.rend())
@@ -2534,7 +2534,7 @@ void Router::outputInstanceToSVG(std::string instanceName)
while (obstacleIt != m_obstacles.end())
{
Obstacle *obstacle = *obstacleIt;
- bool isShape = (NULL != dynamic_cast<ShapeRef *> (obstacle));
+ bool isShape = (nullptr != dynamic_cast<ShapeRef *> (obstacle));
if ( ! isShape )
{
@@ -2563,7 +2563,7 @@ void Router::outputInstanceToSVG(std::string instanceName)
while (obstacleIt != m_obstacles.end())
{
Obstacle *obstacle = *obstacleIt;
- bool isShape = (NULL != dynamic_cast<ShapeRef *> (obstacle));
+ bool isShape = (nullptr != dynamic_cast<ShapeRef *> (obstacle));
if ( ! isShape )
{
@@ -2611,7 +2611,7 @@ void Router::outputInstanceToSVG(std::string instanceName)
while (obstacleIt != m_obstacles.end())
{
Obstacle *obstacle = *obstacleIt;
- bool isShape = (NULL != dynamic_cast<ShapeRef *> (obstacle));
+ bool isShape = (nullptr != dynamic_cast<ShapeRef *> (obstacle));
if ( ! isShape )
{
@@ -2634,7 +2634,7 @@ void Router::outputInstanceToSVG(std::string instanceName)
fprintf(fp, "<g inkscape:groupmode=\"layer\" "
"inkscape:label=\"VisGraph\""
">\n");
- EdgeInf *finish = NULL;
+ EdgeInf *finish = nullptr;
fprintf(fp, "<g inkscape:groupmode=\"layer\" "
"style=\"display: none;\" "
"inkscape:label=\"VisGraph-shape\""
@@ -2872,7 +2872,7 @@ void Router::outputDiagramSVG(std::string instanceName, LineReps *lineReps)
filename += ".svg";
FILE *fp = fopen(filename.c_str(), "w");
- if (fp == NULL)
+ if (fp == nullptr)
{
return;
}
@@ -2922,7 +2922,7 @@ void Router::outputDiagramSVG(std::string instanceName, LineReps *lineReps)
while (obstacleIt != m_obstacles.end())
{
Obstacle *obstacle = *obstacleIt;
- bool isShape = (NULL != dynamic_cast<ShapeRef *> (obstacle));
+ bool isShape = (nullptr != dynamic_cast<ShapeRef *> (obstacle));
if ( ! isShape )
{
@@ -3022,7 +3022,7 @@ void Router::outputDiagramText(std::string instanceName)
filename += ".txt";
FILE *fp = fopen(filename.c_str(), "w");
- if (fp == NULL)
+ if (fp == nullptr)
{
return;
}
@@ -3031,7 +3031,7 @@ void Router::outputDiagramText(std::string instanceName)
while (obstacleIt != m_obstacles.end())
{
Obstacle *obstacle = *obstacleIt;
- bool isShape = (NULL != dynamic_cast<ShapeRef *> (obstacle));
+ bool isShape = (nullptr != dynamic_cast<ShapeRef *> (obstacle));
if ( ! isShape )
{
@@ -3107,7 +3107,7 @@ void ConnRerouteFlagDelegate::removeConn(ConnRef *conn)
{
if (it->first == conn)
{
- it->first = NULL;
+ it->first = nullptr;
}
}
}
@@ -3118,7 +3118,7 @@ void ConnRerouteFlagDelegate::alertConns(void)
std::list<std::pair<ConnRef *, bool> >::iterator it;
for (it = m_mapping.begin(); it != m_mapping.end(); ++it)
{
- if ((it->first != NULL) && (it->second == true))
+ if ((it->first != nullptr) && (it->second == true))
{
it->second = false;
it->first->m_needs_reroute_flag = true;
diff --git a/src/3rdparty/adaptagrams/libavoid/router.h b/src/3rdparty/adaptagrams/libavoid/router.h
index e7cbd4169..4a551be75 100644
--- a/src/3rdparty/adaptagrams/libavoid/router.h
+++ b/src/3rdparty/adaptagrams/libavoid/router.h
@@ -811,7 +811,7 @@ class AVOID_EXPORT Router {
// attention to specific parts of the diagram that have changed
// between steps.
void outputDiagramSVG(std::string instanceName = std::string(),
- LineReps *lineReps = NULL);
+ LineReps *lineReps = nullptr);
void outputDiagramText(std::string instanceName = std::string());
void outputDiagram(std::string instanceName = std::string());
diff --git a/src/3rdparty/adaptagrams/libavoid/scanline.cpp b/src/3rdparty/adaptagrams/libavoid/scanline.cpp
index 8b4993478..9351c3620 100644
--- a/src/3rdparty/adaptagrams/libavoid/scanline.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/scanline.cpp
@@ -23,6 +23,7 @@
*/
#include <cfloat>
+#include <algorithm>
#include "libavoid/scanline.h"
#include "libavoid/obstacle.h"
@@ -51,11 +52,11 @@ bool CmpNodePos::operator() (const Node* u, const Node* v) const
Node::Node(Obstacle *v, const double p)
: v(v),
- c(NULL),
- ss(NULL),
+ c(nullptr),
+ ss(nullptr),
pos(p),
- firstAbove(NULL),
- firstBelow(NULL)
+ firstAbove(nullptr),
+ firstBelow(nullptr)
{
Box bBox = v->routingBox();
min[XDIM] = bBox.min.x;
@@ -66,24 +67,24 @@ Node::Node(Obstacle *v, const double p)
}
Node::Node(VertInf *c, const double p)
- : v(NULL),
+ : v(nullptr),
c(c),
- ss(NULL),
+ ss(nullptr),
pos(p),
- firstAbove(NULL),
- firstBelow(NULL)
+ firstAbove(nullptr),
+ firstBelow(nullptr)
{
min[XDIM] = max[XDIM] = c->point.x;
min[YDIM] = max[YDIM] = c->point.y;
}
Node::Node(ShiftSegment *ss, const double p)
- : v(NULL),
- c(NULL),
+ : v(nullptr),
+ c(nullptr),
ss(ss),
pos(p),
- firstAbove(NULL),
- firstBelow(NULL)
+ firstAbove(nullptr),
+ firstBelow(nullptr)
{
// These values shouldn't ever be used, so they don't matter.
min[XDIM] = max[XDIM] = min[YDIM] = max[YDIM] = 0;
@@ -172,7 +173,7 @@ void Node::findFirstPointAboveAndBelow(const size_t dim, const double linePos,
lastAbovePos = max[dim];
lastBelowPos = min[dim];
- Node *curr = NULL;
+ Node *curr = nullptr;
bool eventsAtSamePos = false;
for (int direction = 0; direction < 2; ++direction)
{
@@ -441,11 +442,11 @@ static void processShiftEvent(NodeSet& scanline, Event *e, size_t dim,
{
// Clean up neighbour pointers.
Node *l = v->firstAbove, *r = v->firstBelow;
- if (l != NULL)
+ if (l != nullptr)
{
l->firstBelow = v->firstBelow;
}
- if (r != NULL)
+ if (r != nullptr)
{
r->firstAbove = v->firstAbove;
}
diff --git a/src/3rdparty/adaptagrams/libavoid/shape.cpp b/src/3rdparty/adaptagrams/libavoid/shape.cpp
index 038f5fddb..7a80907c8 100644
--- a/src/3rdparty/adaptagrams/libavoid/shape.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/shape.cpp
@@ -61,7 +61,7 @@ void ShapeRef::moveAttachedConns(const Polygon& newPoly)
curr != m_following_conns.end(); ++curr)
{
ConnEnd *connEnd = *curr;
- COLA_ASSERT(connEnd->m_conn_ref != NULL);
+ COLA_ASSERT(connEnd->m_conn_ref != nullptr);
bool connPinUpdate = true;
m_router->modifyConnector(connEnd->m_conn_ref, connEnd->endpointType(),
*connEnd, connPinUpdate);
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/2junctions.cpp b/src/3rdparty/adaptagrams/libavoid/tests/2junctions.cpp
index 0165d3514..4ba4233b3 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/2junctions.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/2junctions.cpp
@@ -56,7 +56,7 @@ int test()
pin150429385_0->setExclusive(true);
Avoid::JunctionRef * junction550292508 = new Avoid::JunctionRef(router1, Avoid::Point(50850, 50875), 550292508);
router1->deleteConnector(conn18168360);
- conn18168360 = NULL;
+ conn18168360 = nullptr;
end1 = Avoid::ConnEnd(shape365249936, 5);
end2 = Avoid::ConnEnd(junction550292508);
Avoid::ConnRef * conn795337150 = new Avoid::ConnRef(router1, end1, end2);
@@ -75,25 +75,25 @@ int test()
/*
junction550292508->setPositionFixed(true);
router1->deleteShape(shape365249936);
- shape365249936 = NULL;
+ shape365249936 = nullptr;
router1->deleteShape(shape386142480);
- shape386142480 = NULL;
+ shape386142480 = nullptr;
router1->deleteJunction(junction328922310);
- junction328922310 = NULL;
+ junction328922310 = nullptr;
router1->deleteConnector(conn152169328);
- conn152169328 = NULL;
+ conn152169328 = nullptr;
router1->deleteConnector(conn684888074);
- conn684888074 = NULL;
+ conn684888074 = nullptr;
router1->deleteShape(shape150429385);
- shape150429385 = NULL;
+ shape150429385 = nullptr;
router1->deleteJunction(junction550292508);
- junction550292508 = NULL;
+ junction550292508 = nullptr;
router1->deleteConnector(conn795337150);
- conn795337150 = NULL;
+ conn795337150 = nullptr;
router1->deleteConnector(conn151961380);
- conn151961380 = NULL;
+ conn151961380 = nullptr;
router1->deleteConnector(conn149180423);
- conn149180423 = NULL;
+ conn149180423 = nullptr;
router1->processTransaction();
*/
bool atEnds = true;
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/complex.cpp b/src/3rdparty/adaptagrams/libavoid/tests/complex.cpp
index 81134c2e5..6335a1187 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/complex.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/complex.cpp
@@ -97,7 +97,7 @@ int main(void)
router->processTransaction();
router->deleteShape(shapeRef);
- shapeRef = NULL;
+ shapeRef = nullptr;
router->processTransaction();
router->outputDiagram("output/complex");
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/endlessLoop01.cpp b/src/3rdparty/adaptagrams/libavoid/tests/endlessLoop01.cpp
index 664fb1d8e..8053be838 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/endlessLoop01.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/endlessLoop01.cpp
@@ -100,35 +100,35 @@ void test()
newanddeletedobjects_0 = router0->newAndDeletedObjectListsFromHyperedgeImprovement();
outputDiagram(router0);
router0->deleteConnector(conn0_92116728);
- conn0_92116728 = NULL;
+ conn0_92116728 = nullptr;
router0->deleteConnector(conn0_160581511);
- conn0_160581511 = NULL;
+ conn0_160581511 = nullptr;
router0->deleteConnector(conn0_17788857);
- conn0_17788857 = NULL;
+ conn0_17788857 = nullptr;
router0->deleteJunction(junction0_390996481);
- junction0_390996481 = NULL;
+ junction0_390996481 = nullptr;
router0->deleteConnector(conn0_545568780);
- conn0_545568780 = NULL;
+ conn0_545568780 = nullptr;
router0->deleteConnector(conn0_175131537);
- conn0_175131537 = NULL;
+ conn0_175131537 = nullptr;
router0->deleteJunction(junction0_46074711);
- junction0_46074711 = NULL;
+ junction0_46074711 = nullptr;
router0->deleteConnector(conn0_510680660);
- conn0_510680660 = NULL;
+ conn0_510680660 = nullptr;
router0->deleteConnector(conn0_627671070);
- conn0_627671070 = NULL;
+ conn0_627671070 = nullptr;
router0->deleteJunction(junction0_503331836);
- junction0_503331836 = NULL;
+ junction0_503331836 = nullptr;
router0->deleteConnector(conn0_929108568);
- conn0_929108568 = NULL;
+ conn0_929108568 = nullptr;
router0->deleteJunction(junction0_636368600);
- junction0_636368600 = NULL;
+ junction0_636368600 = nullptr;
router0->deleteShape(shape0_214253640);
- shape0_214253640 = NULL;
+ shape0_214253640 = nullptr;
router0->deleteShape(shape0_35177560);
- shape0_35177560 = NULL;
+ shape0_35177560 = nullptr;
router0->deleteShape(shape0_355243155);
- shape0_355243155 = NULL;
+ shape0_355243155 = nullptr;
router0->processTransaction();
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/example.cpp b/src/3rdparty/adaptagrams/libavoid/tests/example.cpp
index b9cfdb01a..b4a24f755 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/example.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/example.cpp
@@ -32,7 +32,7 @@ static void connCallback(void *ptr)
printf("Connector %u needs rerouting!\n", connRef->id());
- const Avoid::PolyLine& route = connRef->route();
+ const Avoid::PolyLine& route = connRef->displayRoute();
printf("New path: ");
for (size_t i = 0; i < route.ps.size(); ++i)
{
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/forwardFlowingConnectors01.cpp b/src/3rdparty/adaptagrams/libavoid/tests/forwardFlowingConnectors01.cpp
index 61d23744e..b2fa17f55 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/forwardFlowingConnectors01.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/forwardFlowingConnectors01.cpp
@@ -18,7 +18,7 @@ int main(void) {
router->setRoutingOption((RoutingOption)4, true);
router->setRoutingOption((RoutingOption)5, true);
Polygon polygon;
- ConnRef *connRef = NULL;
+ ConnRef *connRef = nullptr;
ConnEnd srcPt;
ConnEnd dstPt;
PolyLine newRoute;
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/hola01.cpp b/src/3rdparty/adaptagrams/libavoid/tests/hola01.cpp
index eeb29e622..d3487bddd 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/hola01.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/hola01.cpp
@@ -28,12 +28,12 @@ int main(void) {
router->setRoutingOption((RoutingOption)5, false);
router->setRoutingOption((RoutingOption)6, false);
Polygon polygon;
- ConnRef *connRef = NULL;
+ ConnRef *connRef = nullptr;
ConnEnd srcPt;
ConnEnd dstPt;
ConnEnd heConnPt;
PolyLine newRoute;
- ShapeConnectionPin *connPin = NULL;
+ ShapeConnectionPin *connPin = nullptr;
// shapeRef1
polygon = Polygon(4);
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/hyperedgeLoop1.cpp b/src/3rdparty/adaptagrams/libavoid/tests/hyperedgeLoop1.cpp
index d59b96c43..2ef50731e 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/hyperedgeLoop1.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/hyperedgeLoop1.cpp
@@ -62,19 +62,19 @@ void test()
router1->outputDiagram("output/hyperedgeLoop1-2");
router1->deleteShape(shape147006780);
- shape147006780 = NULL;
+ shape147006780 = nullptr;
router1->deleteShape(shape69758810);
- shape69758810 = NULL;
+ shape69758810 = nullptr;
router1->deleteShape(shape149922619);
- shape149922619 = NULL;
+ shape149922619 = nullptr;
router1->deleteJunction(junction228834480);
- junction228834480 = NULL;
+ junction228834480 = nullptr;
router1->deleteConnector(conn159270000);
- conn159270000 = NULL;
+ conn159270000 = nullptr;
router1->deleteConnector(conn199495942);
- conn199495942 = NULL;
+ conn199495942 = nullptr;
router1->deleteConnector(conn8326760);
- conn8326760 = NULL;
+ conn8326760 = nullptr;
router1->processTransaction();
delete router1;
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/inlineOverlap10.cpp b/src/3rdparty/adaptagrams/libavoid/tests/inlineOverlap10.cpp
index 218228291..648eed574 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/inlineOverlap10.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/inlineOverlap10.cpp
@@ -17,7 +17,7 @@ int main(void) {
router->setRoutingOption((RoutingOption)4, true);
router->setRoutingOption((RoutingOption)5, true);
Polygon polygon;
- ConnRef *connRef = NULL;
+ ConnRef *connRef = nullptr;
ConnEnd srcPt;
ConnEnd dstPt;
PolyLine newRoute;
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/junction04.cpp b/src/3rdparty/adaptagrams/libavoid/tests/junction04.cpp
index b22505f5f..9e75ff70e 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/junction04.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/junction04.cpp
@@ -82,7 +82,7 @@ int main(void)
// Delete one half of the original connector, up to the junction.
router->deleteConnector(conn1);
- conn1 = NULL;
+ conn1 = nullptr;
router->processTransaction();
router->outputDiagram("output/junction04-4");
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/latesetup.cpp b/src/3rdparty/adaptagrams/libavoid/tests/latesetup.cpp
index e308887d8..80b6cdd08 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/latesetup.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/latesetup.cpp
@@ -61,7 +61,7 @@ int main(void)
router->processTransaction();
router->deleteConnector(connRef2);
- connRef2 = NULL;
+ connRef2 = nullptr;
router->processTransaction();
printf("\nAdd endpoints.\n");
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/nudgingSkipsCheckpoint01.cpp b/src/3rdparty/adaptagrams/libavoid/tests/nudgingSkipsCheckpoint01.cpp
index e0c58b50b..27c9d50e8 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/nudgingSkipsCheckpoint01.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/nudgingSkipsCheckpoint01.cpp
@@ -20,7 +20,7 @@ int main(void) {
router->setRoutingOption((RoutingOption)2, false);
router->setRoutingOption((RoutingOption)3, false);
Polygon polygon;
- ConnRef *connRef = NULL;
+ ConnRef *connRef = nullptr;
ConnEnd srcPt;
ConnEnd dstPt;
#if ALL
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/penaltyRerouting01.cpp b/src/3rdparty/adaptagrams/libavoid/tests/penaltyRerouting01.cpp
index 4542dfdf6..5dabad79c 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/penaltyRerouting01.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/penaltyRerouting01.cpp
@@ -19,7 +19,7 @@ int main(void) {
router->setRoutingOption((RoutingOption)5, false);
router->setRoutingOption((RoutingOption)6, true);
Polygon polygon;
- ConnRef *connRef = NULL;
+ ConnRef *connRef = nullptr;
ConnEnd srcPt;
ConnEnd dstPt;
ConnEnd heConnPt;
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/performance01.cpp b/src/3rdparty/adaptagrams/libavoid/tests/performance01.cpp
index 3735cf563..df22037a7 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/performance01.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/performance01.cpp
@@ -15,7 +15,7 @@ int main(void) {
router->setRoutingOption((RoutingOption)2, false);
router->setRoutingOption((RoutingOption)3, false);
Polygon polygon;
- ConnRef *connRef = NULL;
+ ConnRef *connRef = nullptr;
ConnEnd srcPt;
ConnEnd dstPt;
// shapeRef1
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/removeJunctions01.cpp b/src/3rdparty/adaptagrams/libavoid/tests/removeJunctions01.cpp
index ad2768dbc..3dc09c05d 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/removeJunctions01.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/removeJunctions01.cpp
@@ -23,7 +23,7 @@ int main(void) {
ConnEnd dstPt;
ConnEnd heConnPt;
PolyLine newRoute;
- ShapeConnectionPin *connPin = NULL;
+ ShapeConnectionPin *connPin = nullptr;
// shapeRef1
polygon = Polygon(4);
diff --git a/src/3rdparty/adaptagrams/libavoid/tests/unsatisfiableRangeAssertion.cpp b/src/3rdparty/adaptagrams/libavoid/tests/unsatisfiableRangeAssertion.cpp
index a69891fce..323c098e1 100644
--- a/src/3rdparty/adaptagrams/libavoid/tests/unsatisfiableRangeAssertion.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/tests/unsatisfiableRangeAssertion.cpp
@@ -17,7 +17,7 @@ int main(void) {
router->setRoutingOption((RoutingOption)4, false);
router->setRoutingOption((RoutingOption)5, false);
Polygon polygon;
- ConnRef *connRef = NULL;
+ ConnRef *connRef = nullptr;
ConnEnd srcPt;
ConnEnd dstPt;
PolyLine newRoute;
diff --git a/src/3rdparty/adaptagrams/libavoid/vertices.cpp b/src/3rdparty/adaptagrams/libavoid/vertices.cpp
index 8c2eb0755..6034e0a72 100644
--- a/src/3rdparty/adaptagrams/libavoid/vertices.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/vertices.cpp
@@ -158,16 +158,16 @@ VertInf::VertInf(Router *router, const VertID& vid, const Point& vpoint,
: _router(router),
id(vid),
point(vpoint),
- lstPrev(NULL),
- lstNext(NULL),
- shPrev(NULL),
- shNext(NULL),
+ lstPrev(nullptr),
+ lstNext(nullptr),
+ shPrev(nullptr),
+ shNext(nullptr),
visListSize(0),
orthogVisListSize(0),
invisListSize(0),
- pathNext(NULL),
- m_orthogonalPartner(NULL),
- m_treeRoot(NULL),
+ pathNext(nullptr),
+ m_orthogonalPartner(nullptr),
+ m_treeRoot(nullptr),
visDirections(ConnDirNone),
orthogVisPropFlags(0)
{
@@ -198,7 +198,7 @@ EdgeInf *VertInf::hasNeighbour(VertInf *target, bool orthogonal) const
return *edge;
}
}
- return NULL;
+ return nullptr;
}
void VertInf::Reset(const VertID& vid, const Point& vpoint)
@@ -366,7 +366,7 @@ unsigned int VertInf::pathLeadsBackTo(const VertInf *start) const
}
pathlen++;
- if (i == NULL)
+ if (i == nullptr)
{
// Path not found.
return 0;
@@ -387,7 +387,7 @@ VertInf **VertInf::makeTreeRootPointer(VertInf *root)
VertInf *VertInf::treeRoot(void) const
{
- return (m_treeRoot) ? *m_treeRoot : NULL;
+ return (m_treeRoot) ? *m_treeRoot : nullptr;
}
VertInf **VertInf::treeRootPointer(void) const
@@ -397,7 +397,7 @@ VertInf **VertInf::treeRootPointer(void) const
void VertInf::clearTreeRootPointer(void)
{
- m_treeRoot = NULL;
+ m_treeRoot = nullptr;
}
void VertInf::setTreeRootPointer(VertInf **pointer)
@@ -462,10 +462,10 @@ bool directVis(VertInf *src, VertInf *dst)
VertInfList::VertInfList()
- : _firstShapeVert(NULL),
- _firstConnVert(NULL),
- _lastShapeVert(NULL),
- _lastConnVert(NULL),
+ : _firstShapeVert(nullptr),
+ _firstConnVert(nullptr),
+ _lastShapeVert(nullptr),
+ _lastConnVert(nullptr),
_shapeVertices(0),
_connVertices(0)
{
@@ -475,10 +475,10 @@ VertInfList::VertInfList()
#define checkVertInfListConditions() \
do { \
COLA_ASSERT((!_firstConnVert && (_connVertices == 0)) || \
- ((_firstConnVert->lstPrev == NULL) && (_connVertices > 0))); \
+ ((_firstConnVert->lstPrev == nullptr) && (_connVertices > 0))); \
COLA_ASSERT((!_firstShapeVert && (_shapeVertices == 0)) || \
- ((_firstShapeVert->lstPrev == NULL) && (_shapeVertices > 0))); \
- COLA_ASSERT(!_lastShapeVert || (_lastShapeVert->lstNext == NULL)); \
+ ((_firstShapeVert->lstPrev == nullptr) && (_shapeVertices > 0))); \
+ COLA_ASSERT(!_lastShapeVert || (_lastShapeVert->lstNext == nullptr)); \
COLA_ASSERT(!_lastConnVert || (_lastConnVert->lstNext == _firstShapeVert)); \
COLA_ASSERT((!_firstConnVert && !_lastConnVert) || \
(_firstConnVert && _lastConnVert) ); \
@@ -494,8 +494,8 @@ VertInfList::VertInfList()
void VertInfList::addVertex(VertInf *vert)
{
checkVertInfListConditions();
- COLA_ASSERT(vert->lstPrev == NULL);
- COLA_ASSERT(vert->lstNext == NULL);
+ COLA_ASSERT(vert->lstPrev == nullptr);
+ COLA_ASSERT(vert->lstNext == nullptr);
if (vert->id.isConnPt())
{
@@ -541,7 +541,7 @@ void VertInfList::addVertex(VertInf *vert)
// Join with conns list
if (_lastConnVert)
{
- COLA_ASSERT(_lastConnVert->lstNext == NULL);
+ COLA_ASSERT(_lastConnVert->lstNext == nullptr);
_lastConnVert->lstNext = vert;
}
@@ -556,9 +556,9 @@ void VertInfList::addVertex(VertInf *vert)
// following the removed one.
VertInf *VertInfList::removeVertex(VertInf *vert)
{
- if (vert == NULL)
+ if (vert == nullptr)
{
- return NULL;
+ return nullptr;
}
// Conditions for correct data structure
checkVertInfListConditions();
@@ -573,8 +573,8 @@ VertInf *VertInfList::removeVertex(VertInf *vert)
if (vert == _lastConnVert)
{
- _firstConnVert = NULL;
- _lastConnVert = NULL;
+ _firstConnVert = nullptr;
+ _lastConnVert = nullptr;
}
else
{
@@ -584,7 +584,7 @@ VertInf *VertInfList::removeVertex(VertInf *vert)
if (_firstConnVert)
{
// Set previous
- _firstConnVert->lstPrev = NULL;
+ _firstConnVert->lstPrev = nullptr;
}
}
}
@@ -613,16 +613,16 @@ VertInf *VertInfList::removeVertex(VertInf *vert)
if (vert == _firstShapeVert)
{
- _firstShapeVert = NULL;
+ _firstShapeVert = nullptr;
if (_lastConnVert)
{
- _lastConnVert->lstNext = NULL;
+ _lastConnVert->lstNext = nullptr;
}
}
if (_lastShapeVert)
{
- _lastShapeVert->lstNext = NULL;
+ _lastShapeVert->lstNext = nullptr;
}
}
else if (vert == _firstShapeVert)
@@ -638,7 +638,7 @@ VertInf *VertInfList::removeVertex(VertInf *vert)
if (_firstShapeVert)
{
- _firstShapeVert->lstPrev = NULL;
+ _firstShapeVert->lstPrev = nullptr;
}
}
else
@@ -648,8 +648,8 @@ VertInf *VertInfList::removeVertex(VertInf *vert)
}
_shapeVertices--;
}
- vert->lstPrev = NULL;
- vert->lstNext = NULL;
+ vert->lstPrev = nullptr;
+ vert->lstNext = nullptr;
checkVertInfListConditions();
@@ -681,7 +681,7 @@ VertInf *VertInfList::getVertexByID(const VertID& id)
return curr;
}
}
- return NULL;
+ return nullptr;
}
@@ -695,7 +695,7 @@ VertInf *VertInfList::getVertexByPos(const Point& p)
return curr;
}
}
- return NULL;
+ return nullptr;
}
@@ -718,7 +718,7 @@ VertInf *VertInfList::connsBegin(void)
VertInf *VertInfList::end(void)
{
- return NULL;
+ return nullptr;
}
diff --git a/src/3rdparty/adaptagrams/libavoid/viscluster.cpp b/src/3rdparty/adaptagrams/libavoid/viscluster.cpp
index 922537b4b..ebc0c5080 100644
--- a/src/3rdparty/adaptagrams/libavoid/viscluster.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/viscluster.cpp
@@ -39,7 +39,7 @@ ClusterRef::ClusterRef(Router *router, Polygon& polygon, const unsigned int id)
m_rectangular_polygon(m_polygon.boundingRectPolygon()),
m_active(false)
{
- COLA_ASSERT(m_router != NULL);
+ COLA_ASSERT(m_router != nullptr);
m_id = m_router->assignId(id);
m_router->addCluster(this);
diff --git a/src/3rdparty/adaptagrams/libavoid/visibility.cpp b/src/3rdparty/adaptagrams/libavoid/visibility.cpp
index 8f98d575a..3adadd446 100644
--- a/src/3rdparty/adaptagrams/libavoid/visibility.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/visibility.cpp
@@ -214,8 +214,8 @@ class EdgePair
{
public:
EdgePair()
- : vInf1(NULL),
- vInf2(NULL),
+ : vInf1(nullptr),
+ vInf2(nullptr),
dist1(0.0),
dist2(0.0),
angle(0.0),
@@ -572,7 +572,7 @@ static void vertexSweep(VertInf *vert)
const double& currDist = (*t).distance;
EdgeInf *edge = EdgeInf::existingEdge(centerInf, currInf);
- if (edge == NULL)
+ if (edge == nullptr)
{
edge = new EdgeInf(centerInf, currInf);
}
@@ -629,7 +629,7 @@ static void vertexSweep(VertInf *vert)
if (!(edge->added()) && !(router->InvisibilityGrph))
{
delete edge;
- edge = NULL;
+ edge = nullptr;
}
if (!(currID.isConnPt()))
diff --git a/src/3rdparty/adaptagrams/libavoid/vpsc.cpp b/src/3rdparty/adaptagrams/libavoid/vpsc.cpp
index 294100c91..0a8efb0a4 100644
--- a/src/3rdparty/adaptagrams/libavoid/vpsc.cpp
+++ b/src/3rdparty/adaptagrams/libavoid/vpsc.cpp
@@ -154,7 +154,7 @@ bool IncSolver::constraintGraphIsCyclic(const unsigned n, Variable* const vs[])
}
}
while(graph.size()>0) {
- node *u=NULL;
+ node *u=nullptr;
vector<node*>::iterator i=graph.begin();
for(;i!=graph.end();++i) {
u=*i;
@@ -197,7 +197,7 @@ bool IncSolver::blockGraphIsCyclic() {
Block *b = bs->at(i);
b->setUpInConstraints();
Constraint *c=b->findMinInConstraint();
- while(c!=NULL) {
+ while(c!=nullptr) {
Block *l=c->left->block;
bmap[b]->in.insert(bmap[l]);
b->deleteMinInConstraint();
@@ -206,7 +206,7 @@ bool IncSolver::blockGraphIsCyclic() {
b->setUpOutConstraints();
c=b->findMinOutConstraint();
- while(c!=NULL) {
+ while(c!=nullptr) {
Block *r=c->right->block;
bmap[b]->out.insert(bmap[r]);
b->deleteMinOutConstraint();
@@ -214,7 +214,7 @@ bool IncSolver::blockGraphIsCyclic() {
}
}
while(graph.size()>0) {
- node *u=NULL;
+ node *u=nullptr;
vector<node*>::iterator i=graph.begin();
for(;i!=graph.end();++i) {
u=*i;
@@ -278,7 +278,7 @@ bool IncSolver::satisfy() {
#endif
splitBlocks();
//long splitCtr = 0;
- Constraint* v = NULL;
+ Constraint* v = nullptr;
//CBuffer buffer(inactive);
while ( (v = mostViolated(inactive)) &&
(v->equality || ((v->slack() < ZERO_UPPERBOUND) && !v->active)) )
@@ -304,7 +304,7 @@ bool IncSolver::satisfy() {
try {
Constraint* splitConstraint
=lb->splitBetween(v->left,v->right,lb,rb);
- if(splitConstraint!=NULL) {
+ if(splitConstraint!=nullptr) {
COLA_ASSERT(!splitConstraint->active);
inactive.push_back(splitConstraint);
} else {
@@ -392,13 +392,13 @@ void IncSolver::splitBlocks() {
{
Block *b = bs->at(i);
Constraint* v=b->findMinLM();
- if(v!=NULL && v->lm < LAGRANGIAN_TOLERANCE) {
+ if(v!=nullptr && v->lm < LAGRANGIAN_TOLERANCE) {
COLA_ASSERT(!v->equality);
#ifdef LIBVPSC_LOGGING
f<<" found split point: "<<*v<<" lm="<<v->lm<<endl;
#endif
splitCnt++;
- Block *b = v->left->block, *l=NULL, *r=NULL;
+ Block *b = v->left->block, *l=nullptr, *r=nullptr;
COLA_ASSERT(v->left->block == v->right->block);
//double pos = b->posn;
b->split(l,r,v);
@@ -431,14 +431,14 @@ void IncSolver::splitBlocks() {
Constraint* IncSolver::mostViolated(Constraints &l)
{
double slackForMostViolated = DBL_MAX;
- Constraint* mostViolated = NULL;
+ Constraint* mostViolated = nullptr;
#ifdef LIBVPSC_LOGGING
ofstream f(LOGFILE,ios::app);
f << "Looking for most violated..." << endl;
#endif
size_t lSize = l.size();
size_t deleteIndex = lSize;
- Constraint *constraint = NULL;
+ Constraint *constraint = nullptr;
double slack = 0;
for (size_t index = 0; index < lSize; ++index)
{
@@ -551,13 +551,13 @@ void Blocks::mergeLeft(Block *r) {
r->timeStamp=++blockTimeCtr;
r->setUpInConstraints();
Constraint *c=r->findMinInConstraint();
- while (c != NULL && c->slack()<0) {
+ while (c != nullptr && c->slack()<0) {
#ifdef LIBVPSC_LOGGING
f<<"mergeLeft on constraint: "<<*c<<endl;
#endif
r->deleteMinInConstraint();
Block *l = c->left->block;
- if (l->in==NULL) l->setUpInConstraints();
+ if (l->in==nullptr) l->setUpInConstraints();
double dist = c->right->offset - c->left->offset - c->gap;
if (r->vars->size() < l->vars->size()) {
dist=-dist;
@@ -584,7 +584,7 @@ void Blocks::mergeRight(Block *l) {
#endif
l->setUpOutConstraints();
Constraint *c = l->findMinOutConstraint();
- while (c != NULL && c->slack()<0) {
+ while (c != nullptr && c->slack()<0) {
#ifdef LIBVPSC_LOGGING
f<<"mergeRight on constraint: "<<*c<<endl;
#endif
@@ -725,11 +725,11 @@ Block::Block(Blocks *blocks, Variable* const v)
//, wposn(0)
, deleted(false)
, timeStamp(0)
- , in(NULL)
- , out(NULL)
+ , in(nullptr)
+ , out(nullptr)
, blocks(blocks)
{
- if(v!=NULL) {
+ if(v!=nullptr) {
v->offset=0;
addVariable(v);
}
@@ -862,7 +862,7 @@ void Block::mergeOut(Block *b) {
}
}
Constraint *Block::findMinInConstraint() {
- Constraint *v = NULL;
+ Constraint *v = nullptr;
vector<Constraint*> outOfDate;
while (!in->empty()) {
v = in->top();
@@ -904,18 +904,18 @@ Constraint *Block::findMinInConstraint() {
in->push(v);
}
if(in->empty()) {
- v=NULL;
+ v=nullptr;
} else {
v=in->top();
}
return v;
}
Constraint *Block::findMinOutConstraint() {
- if(out->empty()) return NULL;
+ if(out->empty()) return nullptr;
Constraint *v = out->top();
while (v->left->block == v->right->block) {
out->pop();
- if(out->empty()) return NULL;
+ if(out->empty()) return nullptr;
v = out->top();
}
return v;
@@ -951,7 +951,7 @@ double Block::compute_dfdv(Variable* const v, Variable* const u,
if(canFollowRight(c,u)) {
c->lm=compute_dfdv(c->right,v,min_lm);
dfdv+=c->lm*c->left->scale;
- if(!c->equality&&(min_lm==NULL||c->lm<min_lm->lm)) min_lm=c;
+ if(!c->equality&&(min_lm==nullptr||c->lm<min_lm->lm)) min_lm=c;
}
}
for(Cit it=v->in.begin();it!=v->in.end();++it) {
@@ -959,7 +959,7 @@ double Block::compute_dfdv(Variable* const v, Variable* const u,
if(canFollowLeft(c,u)) {
c->lm=-compute_dfdv(c->left,v,min_lm);
dfdv-=c->lm*c->right->scale;
- if(!c->equality&&(min_lm==NULL||c->lm<min_lm->lm)) min_lm=c;
+ if(!c->equality&&(min_lm==nullptr||c->lm<min_lm->lm)) min_lm=c;
}
}
return dfdv/v->scale;
@@ -985,9 +985,9 @@ double Block::compute_dfdv(Variable* const v, Variable* const u) {
// The top level v and r are variables between which we want to find the
// constraint with the smallest lm.
-// Similarly, m is initially NULL and is only assigned a value if the next
+// Similarly, m is initially nullptr and is only assigned a value if the next
// variable to be visited is r or if a possible min constraint is returned from
-// a nested call (rather than NULL).
+// a nested call (rather than nullptr).
// Then, the search for the m with minimum lm occurs as we return from
// the recursion (checking only constraints traversed left-to-right
// in order to avoid creating any new violations).
@@ -1046,7 +1046,7 @@ Block::Pair Block::compute_dfdv_between(
Variable* r, Variable* const v, Variable* const u,
const Direction dir = NONE, bool changedDirection = false) {
double dfdv=v->weight*(v->position() - v->desiredPosition);
- Constraint *m=NULL;
+ Constraint *m=nullptr;
for(Cit it(v->in.begin());it!=v->in.end();++it) {
Constraint *c=*it;
if(canFollowLeft(c,u)) {
@@ -1054,7 +1054,7 @@ Block::Pair Block::compute_dfdv_between(
changedDirection = true;
}
if(c->left==r) {
- r=NULL;
+ r=nullptr;
if(!c->equality) m=c;
}
Pair p=compute_dfdv_between(r,c->left,v,
@@ -1071,7 +1071,7 @@ Block::Pair Block::compute_dfdv_between(
changedDirection = true;
}
if(c->right==r) {
- r=NULL;
+ r=nullptr;
if(!c->equality) m=c;
}
Pair p=compute_dfdv_between(r,c->right,v,
@@ -1133,33 +1133,33 @@ void Block::list_active(Variable* const v, Variable* const u) {
* that most wants to split
*/
Constraint *Block::findMinLM() {
- Constraint *min_lm=NULL;
- reset_active_lm(vars->front(),NULL);
- compute_dfdv(vars->front(),NULL,min_lm);
+ Constraint *min_lm=nullptr;
+ reset_active_lm(vars->front(),nullptr);
+ compute_dfdv(vars->front(),nullptr,min_lm);
#ifdef LIBVPSC_LOGGING
ofstream f(LOGFILE,ios::app);
f<<" langrangians: "<<endl;
- list_active(vars->front(),NULL);
+ list_active(vars->front(),nullptr);
#endif
return min_lm;
}
Constraint *Block::findMinLMBetween(Variable* const lv, Variable* const rv) {
- reset_active_lm(vars->front(),NULL);
- compute_dfdv(vars->front(),NULL);
- Constraint *min_lm=NULL;
- split_path(rv,lv,NULL,min_lm);
+ reset_active_lm(vars->front(),nullptr);
+ compute_dfdv(vars->front(),nullptr);
+ Constraint *min_lm=nullptr;
+ split_path(rv,lv,nullptr,min_lm);
#if 0
- if(min_lm==NULL) {
- split_path(rv,lv,NULL,min_lm,true);
+ if(min_lm==nullptr) {
+ split_path(rv,lv,nullptr,min_lm,true);
}
#else
- if(min_lm==NULL) {
+ if(min_lm==nullptr) {
//err_printf("Couldn't find split point!\n");
UnsatisfiableException e;
- getActivePathBetween(e.path,lv,rv,NULL);
+ getActivePathBetween(e.path,lv,rv,nullptr);
throw e;
}
- COLA_ASSERT(min_lm!=NULL);
+ COLA_ASSERT(min_lm!=nullptr);
#endif
return min_lm;
}
@@ -1207,7 +1207,7 @@ bool Block::getActivePathBetween(Constraints& path, Variable const* u,
bool Block::isActiveDirectedPathBetween(Variable const* u, Variable const* v) const {
if(u==v) return true;
for (Cit_const c=u->out.begin();c!=u->out.end();++c) {
- if(canFollowRight(*c,NULL)) {
+ if(canFollowRight(*c,nullptr)) {
if(isActiveDirectedPathBetween((*c)->right,v)) {
return true;
}
@@ -1219,7 +1219,7 @@ bool Block::getActiveDirectedPathBetween(
Constraints& path, Variable const* u, Variable const* v) const {
if(u==v) return true;
for (Cit_const c=u->out.begin();c!=u->out.end();++c) {
- if(canFollowRight(*c,NULL)) {
+ if(canFollowRight(*c,nullptr)) {
if(getActiveDirectedPathBetween(path,(*c)->right,v)) {
path.push_back(*c);
return true;
@@ -1244,7 +1244,7 @@ Constraint* Block::splitBetween(Variable* const vl, Variable* const vr,
#ifdef LIBVPSC_LOGGING
f<<" going to split on: "<<*c<<endl;
#endif
- if(c!=NULL) {
+ if(c!=nullptr) {
split(lb,rb,c);
deleted = true;
}
@@ -1299,7 +1299,7 @@ Constraint::Constraint(Variable *left, Variable *right, double gap, bool equalit
equality(equality),
unsatisfiable(false),
needsScaling(true),
- creator(NULL)
+ creator(nullptr)
{
// In hindsight I think it's probably better to build the constraint DAG
// (by creating variable in/out lists) when needed, rather than in advance
diff --git a/src/3rdparty/adaptagrams/libavoid/vpsc.h b/src/3rdparty/adaptagrams/libavoid/vpsc.h
index 52f9bf828..947cb90e7 100644
--- a/src/3rdparty/adaptagrams/libavoid/vpsc.h
+++ b/src/3rdparty/adaptagrams/libavoid/vpsc.h
@@ -12,12 +12,12 @@
* See the file LICENSE.LGPL distributed with the library.
*
* Licensees holding a valid commercial license may use this file in
- * accordance with the commercial license agreement provided with the
+ * accordance with the commercial license agreement provided with the
* library.
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Author(s): Tim Dwyer
* Michael Wybrow
@@ -44,9 +44,9 @@
// By default, libavoid will use it's own version of VPSC defined in this file.
//
// Alternatively, you can directly use IncSolver from libvpsc. This
-// introduces a dependency on libvpsc but it can be preferable in cases
+// introduces a dependency on libvpsc but it can be preferable in cases
// where you are building all of Adaptagrams together and want to work
-// with a set of CompoundConstraints or other classes built upon the
+// with a set of CompoundConstraints or other classes built upon the
// base libvpsc Constraint classes.
// Include necessary headers from libvpsc.
@@ -110,7 +110,7 @@ public:
//double weight;
//double wposn;
PositionStats ps;
- Block(Blocks *blocks, Variable* const v=NULL);
+ Block(Blocks *blocks, Variable* const v=nullptr);
~Block(void);
Constraint* findMinLM();
Constraint* findMinLMBetween(Variable* const lv, Variable* const rv);
@@ -144,7 +144,7 @@ private:
void list_active(Variable* const v, Variable* const u);
double compute_dfdv(Variable* const v, Variable* const u);
double compute_dfdv(Variable* const v, Variable* const u, Constraint *&min_lm);
- bool split_path(Variable*, Variable* const, Variable* const,
+ bool split_path(Variable*, Variable* const, Variable* const,
Constraint* &min_lm, bool desperation);
bool canFollowLeft(Constraint const* c, Variable const* last) const;
bool canFollowRight(Constraint const* c, Variable const* last) const;
@@ -169,7 +169,7 @@ public:
int id; // useful in log files
double desiredPosition;
double finalPosition;
- double weight; // how much the variable wants to
+ double weight; // how much the variable wants to
// be at it's desired position
double scale; // translates variable to another space
double offset;
@@ -178,14 +178,14 @@ public:
bool fixedDesiredPosition;
Constraints in;
Constraints out;
- inline Variable(const int id, const double desiredPos=-1.0,
+ inline Variable(const int id, const double desiredPos=-1.0,
const double weight=1.0, const double scale=1.0)
: id(id)
, desiredPosition(desiredPos)
, weight(weight)
, scale(scale)
, offset(0)
- , block(NULL)
+ , block(nullptr)
, visited(false)
, fixedDesiredPosition(false)
{
@@ -210,20 +210,20 @@ class Constraint
public:
Constraint(Variable *left, Variable *right, double gap, bool equality=false);
~Constraint();
- inline double slack(void) const
- {
+ inline double slack(void) const
+ {
if (unsatisfiable)
{
return DBL_MAX;
}
if (needsScaling)
{
- return right->scale * right->position() - gap -
+ return right->scale * right->position() - gap -
left->scale * left->position();
}
COLA_ASSERT(left->scale == 1);
COLA_ASSERT(right->scale == 1);
- return right->unscaledPosition() - gap - left->unscaledPosition();
+ return right->unscaledPosition() - gap - left->unscaledPosition();
}
std::string toString(void) const;
@@ -255,7 +255,7 @@ public:
std::list<Variable*> *totalOrder();
void cleanup();
double cost();
-
+
size_t size() const;
Block *at(size_t index) const;
void insert(Block *block);
@@ -302,7 +302,7 @@ public:
bool solve();
void moveBlocks();
void splitBlocks();
- IncSolver(Variables const &vs, Constraints const &cs);
+ IncSolver(Variables const &vs, Constraints const &cs);
~IncSolver();
void addConstraint(Constraint *constraint);
@@ -339,4 +339,3 @@ extern Constraints constraintsRemovingRedundantEqualities(
#endif // ! USELIBVPSC
#endif // AVOID_VPSC_H
-
diff --git a/src/3rdparty/adaptagrams/libcola/README b/src/3rdparty/adaptagrams/libcola/README
deleted file mode 100644
index 03d43be29..000000000
--- a/src/3rdparty/adaptagrams/libcola/README
+++ /dev/null
@@ -1 +0,0 @@
-libcola, libavoid, and libvpsc are used for connector routing.
diff --git a/src/3rdparty/adaptagrams/libcola/cc_clustercontainmentconstraints.cpp b/src/3rdparty/adaptagrams/libcola/cc_clustercontainmentconstraints.cpp
index 93f94eb35..390f5e1de 100644
--- a/src/3rdparty/adaptagrams/libcola/cc_clustercontainmentconstraints.cpp
+++ b/src/3rdparty/adaptagrams/libcola/cc_clustercontainmentconstraints.cpp
@@ -169,7 +169,7 @@ void ClusterContainmentConstraints::generateSeparationConstraints(
continue;
}
- vpsc::Constraint *constraint = NULL;
+ vpsc::Constraint *constraint = nullptr;
if (info->boundarySide == BelowBoundary)
{
// Constrain the objects with negative offsets to be
diff --git a/src/3rdparty/adaptagrams/libcola/cc_nonoverlapconstraints.cpp b/src/3rdparty/adaptagrams/libcola/cc_nonoverlapconstraints.cpp
index 3911651f5..69502d094 100644
--- a/src/3rdparty/adaptagrams/libcola/cc_nonoverlapconstraints.cpp
+++ b/src/3rdparty/adaptagrams/libcola/cc_nonoverlapconstraints.cpp
@@ -78,84 +78,6 @@ bool NonOverlapConstraintExemptions::shapePairIsExempt(
// NonOverlapConstraints code
//-----------------------------------------------------------------------------
-class OverlapShapeOffsets : public SubConstraintInfo
-{
- public:
- OverlapShapeOffsets(unsigned ind, double xOffset, double yOffset,
- unsigned int group)
- : SubConstraintInfo(ind),
- cluster(NULL),
- rectPadding(0),
- group(group)
- {
- halfDim[0] = xOffset;
- halfDim[1] = yOffset;
- }
- OverlapShapeOffsets(unsigned ind, Cluster *cluster, unsigned int group)
- : SubConstraintInfo(ind),
- cluster(cluster),
- rectPadding(cluster->margin()),
- group(group)
- {
- halfDim[0] = 0;
- halfDim[1] = 0;
- }
- OverlapShapeOffsets()
- : SubConstraintInfo(1000000),
- cluster(NULL),
- rectPadding(0)
- {
- }
- bool usesClusterBounds(void) const
- {
- return (cluster && !cluster->clusterIsFromFixedRectangle());
- }
- Cluster *cluster;
- double halfDim[2]; // Half width and height values.
- Box rectPadding; // Used for cluster padding.
- unsigned int group;
-};
-
-
-class ShapePairInfo
-{
- public:
- ShapePairInfo(unsigned ind1, unsigned ind2, unsigned ord = 1)
- : order(ord),
- satisfied(false),
- processed(false)
- {
- COLA_ASSERT(ind1 != ind2);
- // Assign the lesser value to varIndex1.
- varIndex1 = (ind1 < ind2) ? ind1 : ind2;
- // Assign the greater value to varIndex2.
- varIndex2 = (ind1 > ind2) ? ind1 : ind2;
- }
- bool operator<(const ShapePairInfo& rhs) const
- {
- // Make sure the processed ones are at the end after sorting.
- int processedInt = processed ? 1 : 0;
- int rhsProcessedInt = rhs.processed ? 1 : 0;
- if (processedInt != rhsProcessedInt)
- {
- return processedInt < rhsProcessedInt;
- }
- // Use cluster ordering for primary sorting.
- if (order != rhs.order)
- {
- return order < rhs.order;
- }
- return overlapMax > rhs.overlapMax;
- }
- unsigned short order;
- unsigned short varIndex1;
- unsigned short varIndex2;
- bool satisfied;
- bool processed;
- double overlapMax;
-};
-
-
NonOverlapConstraints::NonOverlapConstraints(
NonOverlapConstraintExemptions *exemptions, unsigned int priority)
: CompoundConstraint(vpsc::HORIZONTAL, priority),
@@ -167,14 +89,14 @@ NonOverlapConstraints::NonOverlapConstraints(
}
void NonOverlapConstraints::addShape(unsigned id, double halfW, double halfH,
- unsigned int group)
+ unsigned int group, std::set<unsigned> exemptions)
{
// Setup pairInfos for all other shapes.
for (std::map<unsigned, OverlapShapeOffsets>::iterator curr =
shapeOffsets.begin(); curr != shapeOffsets.end(); ++curr)
{
unsigned otherId = curr->first;
- if ((shapeOffsets[otherId].group == group) && (id != otherId))
+ if ((shapeOffsets[otherId].group == group) && (id != otherId) && exemptions.count(otherId)==0)
{
if (m_exemptions &&
m_exemptions->shapePairIsExempt(ShapePair(otherId, id)))
@@ -190,6 +112,27 @@ void NonOverlapConstraints::addShape(unsigned id, double halfW, double halfH,
shapeOffsets[id] = OverlapShapeOffsets(id, halfW, halfH, group);
}
+void NonOverlapConstraints::resizeShape(unsigned id, double halfW, double halfH)
+{
+ OverlapShapeOffsets oso = shapeOffsets[id];
+ oso.resize(halfW, halfH);
+}
+
+void NonOverlapConstraints::removeShape(unsigned id)
+{
+ // Remove the OverlapShapeOffsets object for this id.
+ shapeOffsets.erase(id);
+ // Remove all ShapePairInfo objects having this id as one of their two indices.
+ std::list<ShapePairInfo>::iterator it = pairInfoList.begin();
+ while (it != pairInfoList.end()) {
+ ShapePairInfo spi = *it;
+ if (spi.varIndex1==id || spi.varIndex2==id) {
+ it = pairInfoList.erase(it); // now it points to next list element after one erased
+ } else {
+ it++;
+ }
+ }
+}
// This is expected to be called after all addNode calls.
void NonOverlapConstraints::addCluster(Cluster *cluster, unsigned int group)
@@ -590,10 +533,10 @@ void NonOverlapConstraints::generateSeparationConstraints(
double below2 = shape2.halfDim[dim];
double above2 = shape2.halfDim[dim];
- vpsc::Variable *varLeft1 = NULL;
- vpsc::Variable *varLeft2 = NULL;
- vpsc::Variable *varRight1 = NULL;
- vpsc::Variable *varRight2 = NULL;
+ vpsc::Variable *varLeft1 = nullptr;
+ vpsc::Variable *varLeft2 = nullptr;
+ vpsc::Variable *varRight1 = nullptr;
+ vpsc::Variable *varRight2 = nullptr;
if (shape1.cluster)
{
// Must constraint to cluster boundary variables.
@@ -626,7 +569,7 @@ void NonOverlapConstraints::generateSeparationConstraints(
if (rect1.overlapD(!dim, &rect2) > 0.0005)
{
- vpsc::Constraint *constraint = NULL;
+ vpsc::Constraint *constraint = nullptr;
if (pos1 < pos2)
{
constraint = new vpsc::Constraint(varRight1, varLeft2,
diff --git a/src/3rdparty/adaptagrams/libcola/cc_nonoverlapconstraints.h b/src/3rdparty/adaptagrams/libcola/cc_nonoverlapconstraints.h
index 04f756da9..0904ece0e 100644
--- a/src/3rdparty/adaptagrams/libcola/cc_nonoverlapconstraints.h
+++ b/src/3rdparty/adaptagrams/libcola/cc_nonoverlapconstraints.h
@@ -24,6 +24,8 @@
#define COLA_CC_NONOVERLAPCONSTRAINTS_H
#include <vector>
+
+#include "libcola/cola.h"
#include "libcola/compound_constraints.h"
#include "libcola/shapepair.h"
@@ -33,10 +35,90 @@ class Rectangle;
namespace cola {
-class OverlapShapeOffsets;
-class ShapePairInfo;
class Cluster;
+class OverlapShapeOffsets : public SubConstraintInfo
+{
+ public:
+ OverlapShapeOffsets(unsigned ind, double xOffset, double yOffset,
+ unsigned int group)
+ : SubConstraintInfo(ind),
+ cluster(nullptr),
+ rectPadding(0),
+ group(group)
+ {
+ halfDim[0] = xOffset;
+ halfDim[1] = yOffset;
+ }
+ OverlapShapeOffsets(unsigned ind, Cluster *cluster, unsigned int group)
+ : SubConstraintInfo(ind),
+ cluster(cluster),
+ rectPadding(cluster->margin()),
+ group(group)
+ {
+ halfDim[0] = 0;
+ halfDim[1] = 0;
+ }
+ OverlapShapeOffsets()
+ : SubConstraintInfo(1000000),
+ cluster(nullptr),
+ rectPadding(0)
+ {
+ }
+ bool usesClusterBounds(void) const
+ {
+ return (cluster && !cluster->clusterIsFromFixedRectangle());
+ }
+ void resize(double xOffset, double yOffset)
+ {
+ halfDim[0] = xOffset;
+ halfDim[1] = yOffset;
+ }
+ Cluster *cluster;
+ double halfDim[2]; // Half width and height values.
+ Box rectPadding; // Used for cluster padding.
+ unsigned int group;
+};
+
+
+class ShapePairInfo
+{
+ public:
+ ShapePairInfo(unsigned ind1, unsigned ind2, unsigned ord = 1)
+ : order(ord),
+ satisfied(false),
+ processed(false)
+ {
+ COLA_ASSERT(ind1 != ind2);
+ // Assign the lesser value to varIndex1.
+ varIndex1 = (ind1 < ind2) ? ind1 : ind2;
+ // Assign the greater value to varIndex2.
+ varIndex2 = (ind1 > ind2) ? ind1 : ind2;
+ }
+ bool operator<(const ShapePairInfo& rhs) const
+ {
+ // Make sure the processed ones are at the end after sorting.
+ int processedInt = processed ? 1 : 0;
+ int rhsProcessedInt = rhs.processed ? 1 : 0;
+ if (processedInt != rhsProcessedInt)
+ {
+ return processedInt < rhsProcessedInt;
+ }
+ // Use cluster ordering for primary sorting.
+ if (order != rhs.order)
+ {
+ return order < rhs.order;
+ }
+ return overlapMax > rhs.overlapMax;
+ }
+ unsigned short order;
+ unsigned short varIndex1;
+ unsigned short varIndex2;
+ bool satisfied;
+ bool processed;
+ double overlapMax;
+};
+
// Stores IDs of all rectangles exempt from non-overlap constraints.
class NonOverlapConstraintExemptions {
@@ -44,6 +126,7 @@ class NonOverlapConstraintExemptions {
NonOverlapConstraintExemptions();
void addExemptGroupOfNodes(ListOfNodeIndexes listOfNodeGroups);
bool shapePairIsExempt(ShapePair shapePair) const;
+ std::set<ShapePair> getExemptPairs(void) {return m_exempt_pairs;}
private:
std::set<ShapePair> m_exempt_pairs;
@@ -54,11 +137,25 @@ class NonOverlapConstraints : public CompoundConstraint {
public:
NonOverlapConstraints(NonOverlapConstraintExemptions *exemptions,
unsigned int priority = PRIORITY_NONOVERLAP);
- // Group is used to determine which objects should be made not to
- // overlap with this one -- only objects in the same group.
- // This is useful for clusters.
+ //! @brief Use this method to add all the shapes between which you want
+ //! to prevent overlaps.
+ //! @param id This will be used as index into both the vars and
+ //! boundingBoxes vectors when you call the
+ //! generateSeparationConstraints method.
+ //! @param halfW If you add two shapes with half-widths hwi and hwj, then
+ //! if a horizontal separation constraint is generated between
+ //! them its gap will be hwi + hwj.
+ //! @param halfH Similar to halfW.
+ //! @param group Assign a group number to this shape. A separation constraint
+ //! will be generated between two shapes only if they belong to
+ //! the same group. This is useful for clusters.
+ //! @param exemptions Optional set of IDs of shapes to be skipped, i.e. such that
+ //! a separation constraint should /not/ be generated between
+ //! that shape and the one being added.
void addShape(unsigned id, double halfW, double halfH,
- unsigned int group = 1);
+ unsigned int group = 1, std::set<unsigned> exemptions = std::set<unsigned>());
+ void resizeShape(unsigned id, double halfW, double halfH);
+ void removeShape(unsigned id);
void addCluster(Cluster *cluster, unsigned int group);
void computeAndSortOverlap(vpsc::Variables vs[]);
void markCurrSubConstraintAsActive(const bool satisfiable);
@@ -72,6 +169,21 @@ class NonOverlapConstraints : public CompoundConstraint {
void generateVariables(const vpsc::Dim dim, vpsc::Variables& vars);
void generateSeparationConstraints(const vpsc::Dim dim,
vpsc::Variables& vars, vpsc::Constraints& gcs);
+ //! @brief Generate separation constraints in one dimension, to ensure
+ //! nonoverlap between all shapes in that dimension.
+ //! @param dim The dimension for which to generate constraints.
+ //! @param vars The variables between which the constraints will hold.
+ //! @param gcs The generated constraints will be added to this vector.
+ //! @param boundingBoxes For those id's corresponding to added shapes
+ //! (not clusters), the rectangle boundingBox[id] will be consulted
+ //! in order to determine:
+ //! (1) whether a separation constraint is called for, i.e. whether the
+ //! shapes in question span any of the same coods in the dimension
+ //! opposite to dim;
+ //! (2) which var is left and which is right in the separation constraint.
+ //! Note however that the dimensions of the boundingBoxes do NOT determine
+ //! the gaps of the separation constraints, which are instead based on the
+ //! half-width and half-height passed when adding the shapes.
void generateSeparationConstraints(const vpsc::Dim dim,
vpsc::Variables& vars, vpsc::Constraints& gcs,
std::vector<vpsc::Rectangle*>& boundingBoxes);
diff --git a/src/3rdparty/adaptagrams/libcola/cluster.cpp b/src/3rdparty/adaptagrams/libcola/cluster.cpp
index d8b37d7b6..6fbfc0b6b 100644
--- a/src/3rdparty/adaptagrams/libcola/cluster.cpp
+++ b/src/3rdparty/adaptagrams/libcola/cluster.cpp
@@ -215,10 +215,10 @@ RectangularCluster::RectangularCluster()
m_margin(0),
m_padding(0)
{
- minEdgeRect[vpsc::XDIM] = NULL;
- minEdgeRect[vpsc::YDIM] = NULL;
- maxEdgeRect[vpsc::XDIM] = NULL;
- maxEdgeRect[vpsc::YDIM] = NULL;
+ minEdgeRect[vpsc::XDIM] = nullptr;
+ minEdgeRect[vpsc::YDIM] = nullptr;
+ maxEdgeRect[vpsc::XDIM] = nullptr;
+ maxEdgeRect[vpsc::YDIM] = nullptr;
}
RectangularCluster::RectangularCluster(unsigned rectIndex)
@@ -227,10 +227,10 @@ RectangularCluster::RectangularCluster(unsigned rectIndex)
m_margin(0),
m_padding(0)
{
- minEdgeRect[vpsc::XDIM] = NULL;
- minEdgeRect[vpsc::YDIM] = NULL;
- maxEdgeRect[vpsc::XDIM] = NULL;
- maxEdgeRect[vpsc::YDIM] = NULL;
+ minEdgeRect[vpsc::XDIM] = nullptr;
+ minEdgeRect[vpsc::YDIM] = nullptr;
+ maxEdgeRect[vpsc::XDIM] = nullptr;
+ maxEdgeRect[vpsc::YDIM] = nullptr;
}
RectangularCluster::~RectangularCluster()
@@ -240,12 +240,12 @@ RectangularCluster::~RectangularCluster()
if (minEdgeRect[dim])
{
delete minEdgeRect[dim];
- minEdgeRect[dim] = NULL;
+ minEdgeRect[dim] = nullptr;
}
if (maxEdgeRect[dim])
{
delete maxEdgeRect[dim];
- maxEdgeRect[dim] = NULL;
+ maxEdgeRect[dim] = nullptr;
}
}
}
@@ -521,8 +521,8 @@ void RootCluster::calculateClusterPathsToEachNode(size_t nodesCount)
// due to these two paths to node i.
size_t lcaChildJIndex = i;
size_t lcaChildKIndex = i;
- Cluster *lcaChildJCluster = NULL;
- Cluster *lcaChildKCluster = NULL;
+ Cluster *lcaChildJCluster = nullptr;
+ Cluster *lcaChildKCluster = nullptr;
// lcaIndex < path{J,K}.size() means the child J or K of
// the lca is a Cluster. At least one of them will always
diff --git a/src/3rdparty/adaptagrams/libcola/cola.cpp b/src/3rdparty/adaptagrams/libcola/cola.cpp
index 0009ef894..739c6ea19 100644
--- a/src/3rdparty/adaptagrams/libcola/cola.cpp
+++ b/src/3rdparty/adaptagrams/libcola/cola.cpp
@@ -22,7 +22,6 @@
#include <cmath>
#include "libvpsc/assertions.h"
-#include "libvpsc/isnan.h"
#include "libcola/commondefs.h"
#include "libcola/cola.h"
#include "libcola/conjugate_gradient.h"
@@ -44,7 +43,8 @@ ConstrainedMajorizationLayout
const double idealLength,
EdgeLengths eLengths,
TestConvergence *doneTest,
- PreIteration* preIteration)
+ PreIteration* preIteration,
+ bool useNeighbourStress)
: n(rs.size()),
lap2(valarray<double>(n*n)),
Dij(valarray<double>(n*n)),
@@ -58,18 +58,18 @@ ConstrainedMajorizationLayout
constrainedLayout(false),
nonOverlappingClusters(false),
clusterHierarchy(clusterHierarchy),
- gpX(NULL), gpY(NULL),
- ccs(NULL),
- unsatisfiableX(NULL), unsatisfiableY(NULL),
+ gpX(nullptr), gpY(nullptr),
+ ccs(nullptr),
+ unsatisfiableX(nullptr), unsatisfiableY(nullptr),
avoidOverlaps(None),
- straightenEdges(NULL),
+ straightenEdges(nullptr),
bendWeight(0.1), potBendWeight(0.1),
xSkipping(true),
scaling(true),
externalSolver(false),
majorization(true)
{
- if (done == NULL)
+ if (done == nullptr)
{
done = new TestConvergence();
using_default_done = true;
@@ -99,8 +99,23 @@ ConstrainedMajorizationLayout
}
}
- shortest_paths::johnsons(n,D,es,edgeLengths);
- //shortest_paths::neighbours(n,D,es,edgeLengths);
+ if (useNeighbourStress) {
+ for(unsigned i=0;i<n;i++) {
+ for(unsigned j=0;j<n;j++) {
+ D[i][j]=std::numeric_limits<double>::max();
+ }
+ }
+ bool haveLengths = edgeLengths.size() == es.size();
+ for (unsigned i = 0; i < es.size(); i++) {
+ unsigned source = es[i].first;
+ unsigned target = es[i].second;
+ D[source][target] = D[target][source] = (haveLengths ? edgeLengths[i] : 1.0);
+ }
+ } else {
+ shortest_paths::johnsons(n,D,es,edgeLengths);
+ //shortest_paths::neighbours(n,D,es,edgeLengths);
+ }
+
edge_length = idealLength;
if(clusterHierarchy) {
for(Clusters::const_iterator i=clusterHierarchy->clusters.begin();
@@ -185,7 +200,7 @@ void ConstrainedMajorizationLayout::majorize(
b[i] -= stickyWeight*startCoords[i];
}
b[i] += degree * coords[i];
- COLA_ASSERT(!isNaN(b[i]));
+ COLA_ASSERT(!std::isnan(b[i]));
}
if(constrainedLayout) {
//printf("GP iteration...\n");
@@ -303,7 +318,7 @@ inline double ConstrainedMajorizationLayout
void ConstrainedMajorizationLayout::run(bool x, bool y) {
if(constrainedLayout) {
- vector<vpsc::Rectangle*>* pbb = boundingBoxes.empty()?NULL:&boundingBoxes;
+ vector<vpsc::Rectangle*>* pbb = boundingBoxes.empty()?nullptr:&boundingBoxes;
SolveWithMosek mosek = Off;
if(externalSolver) mosek=Outer;
// scaling doesn't currently work with straighten edges because sparse
@@ -381,7 +396,7 @@ double ConstrainedMajorizationLayout::computeStress() {
}
void ConstrainedMajorizationLayout::runOnce(bool x, bool y) {
if(constrainedLayout) {
- vector<vpsc::Rectangle*>* pbb = boundingBoxes.empty()?NULL:&boundingBoxes;
+ vector<vpsc::Rectangle*>* pbb = boundingBoxes.empty()?nullptr:&boundingBoxes;
SolveWithMosek mosek = Off;
if(externalSolver) mosek=Outer;
// scaling doesn't currently work with straighten edges because sparse
@@ -667,4 +682,19 @@ Rectangle bounds(vector<Rectangle*>& rs) {
}
#endif
+ ConstrainedMajorizationLayout* simpleCMLFactory(
+ vpsc::Rectangles& rs,
+ std::vector<Edge> const & es,
+ RootCluster* clusterHierarchy,
+ const double idealLength,
+ bool useNeighbourStress
+ ) {
+ cola::EdgeLengths eLengths;
+ for(size_t i = 0; i < es.size(); ++i) {
+ eLengths.push_back(1);
+ }
+ return new ConstrainedMajorizationLayout(rs, es, clusterHierarchy, idealLength,
+ eLengths, nullptr, nullptr, useNeighbourStress);
+ };
+
} // namespace cola
diff --git a/src/3rdparty/adaptagrams/libcola/cola.h b/src/3rdparty/adaptagrams/libcola/cola.h
index 016012134..40043cdb8 100644
--- a/src/3rdparty/adaptagrams/libcola/cola.h
+++ b/src/3rdparty/adaptagrams/libcola/cola.h
@@ -41,6 +41,9 @@ namespace vpsc { class Rectangle; }
namespace topology {
class ColaTopologyAddon;
}
+namespace dialect {
+ class Graph;
+}
/**
@@ -292,8 +295,9 @@ public:
RootCluster* clusterHierarchy,
const double idealLength,
EdgeLengths eLengths = StandardEdgeLengths,
- TestConvergence *doneTest = NULL,
- PreIteration* preIteration=NULL);
+ TestConvergence *doneTest = nullptr,
+ PreIteration* preIteration=nullptr,
+ bool useNeighbourStress = false);
/**
* @brief Specify a set of compound constraints to apply to the layout.
*
@@ -303,6 +307,16 @@ public:
constrainedLayout = true;
this->ccs=ccs;
}
+
+ void setConstraintsVector(cola::CompoundConstraints& ccs) {
+ constrainedLayout = true;
+ cola::CompoundConstraints *ccsp = new cola::CompoundConstraints;
+ for (size_t i = 0; i < ccs.size(); ++i) {
+ ccsp->push_back(ccs.at(i));
+ }
+ this->ccs=ccsp;
+ }
+
/**
* @brief Register to receive information about unsatisfiable constraints.
*
@@ -626,7 +640,7 @@ public:
* specified.
* @param[in] eLengths Individual ideal lengths for edges.
* The actual ideal length used for the ith edge is
- * idealLength*eLengths[i], or if eLengths is NULL a
+ * idealLength*eLengths[i], or if eLengths is nullptr a
* then just idealLength is used (i.e., eLengths[i]
* is assumed to be 1).
* @param[in] done A test of convergence operation called at the end of
@@ -640,8 +654,8 @@ public:
const std::vector<cola::Edge>& es,
const double idealLength,
const EdgeLengths& eLengths = StandardEdgeLengths,
- TestConvergence* doneTest = NULL,
- PreIteration* preIteration = NULL);
+ TestConvergence* doneTest = nullptr,
+ PreIteration* preIteration = nullptr);
~ConstrainedFDLayout();
/**
@@ -754,11 +768,16 @@ public:
* as possible. This includes automatically generated constraints for
* non-overlap and cluster containment.
*
+ * @param[in] xBorder Optional border width to add to left and right
+ * sides of rectangles. Defaults to 1.
+ * @param[in] yBorder Optional border width to add to top and bottom
+ * sides of rectangles. Defaults to 1.
+ *
* @note This method doesn't do force-directed layout. All forces are
* ignored and it merely satisfies the constraints with minimal
* movement to nodes.
*/
- void makeFeasible(void);
+ void makeFeasible(double xBorder=1, double yBorder=1);
/**
* @brief A convenience method that can be called from Java to free
@@ -787,6 +806,56 @@ public:
//!
void outputInstanceToSVG(std::string filename = std::string());
+ /**
+ * @brief Specifies whether neighbour stress should be used.
+ *
+ * Under neighbour stress, only the terms representing neighbouring
+ * nodes contribute to the stress function. This can help to distribute
+ * nodes more evenly, eliminating long-range forces.
+ *
+ * Default value is false.
+ *
+ * @param[in] useNeighbourStress New boolean value for this option.
+ */
+ void setUseNeighbourStress(bool useNeighbourStress);
+
+ /**
+ * @brief Retrieve a copy of the "D matrix" computed by the computePathLengths
+ * method, linearised as a vector.
+ *
+ * This is especially useful for projects in SWIG target languages that want to
+ * do their own computations with stress.
+ *
+ * D is the required euclidean distances between pairs of nodes
+ * based on the shortest paths between them (using
+ * m_idealEdgeLength*eLengths[edge] as the edge length, if eLengths array
+ * is provided otherwise just m_idealEdgeLength).
+ *
+ * @return vector representing the D matrix.
+ */
+ std::vector<double> readLinearD(void);
+
+ /**
+ * @brief Retrieve a copy of the "G matrix" computed by the computePathLengths
+ * method, linearised as a vector.
+ *
+ * * This is especially useful for projects in SWIG target languages that want to
+ * do their own computations with stress.
+ *
+ * G is a matrix of unsigned ints such that G[u][v]=
+ * 0 if there are no forces required between u and v
+ * (for example, if u and v are in unconnected components)
+ * 1 if attractive forces are required between u and v
+ * (i.e. if u and v are immediately connected by an edge and there is
+ * no topology route between u and v (for which an attractive force
+ * is computed elsewhere))
+ * 2 if no attractive force is required between u and v but there is
+ * a connected path between them.
+ *
+ * @return vector representing the G matrix.
+ */
+ std::vector<unsigned> readLinearG(void);
+
double computeStress() const;
private:
@@ -805,7 +874,7 @@ private:
std::valarray<double> &coords,
const double oldStress,
double stepsize
- /*,topology::TopologyConstraints *s=NULL*/);
+ /*,topology::TopologyConstraints *s=nullptr*/);
void computePathLengths(
const std::vector<Edge>& es, std::valarray<double> eLengths);
void generateNonOverlapAndClusterCompoundConstraints(
@@ -822,7 +891,7 @@ private:
cola::CompoundConstraints& idleConstraints);
std::vector<double> offsetDir(double minD);
-
+ void computeNeighbours(std::vector<Edge> es);
std::vector<std::vector<unsigned> > neighbours;
std::vector<std::vector<double> > neighbourLengths;
TestConvergence *done;
@@ -844,13 +913,67 @@ private:
double rectClusterBuffer;
double m_idealEdgeLength;
bool m_generateNonOverlapConstraints;
+ bool m_useNeighbourStress;
const std::valarray<double> m_edge_lengths;
NonOverlapConstraintExemptions *m_nonoverlap_exemptions;
friend class topology::ColaTopologyAddon;
+ friend class dialect::Graph;
+};
+
+struct ProjectionResult {
+ int errorLevel;
+ std::string unsatinfo;
};
+/**
+ * @brief Attempt to do a projection onto a vector of cola CompoundConstraints.
+ * @param dim the dimension in which to perform the projection
+ * @param rs the rectangles representing the nodes
+ * @param ccs the constraints
+ * @param preventOverlaps boolean saying whether you want overlap prevention
+ * constraints to be automatically generated
+ * @param accept an integer indicating which types of infeasibilities you will accept.
+ * The default value of 0 means you accept no infeasibility.
+ * For other values, see the description of the "errorLevel" in the
+ * doctext for the solve function below.
+ * @param debugLevel see solve function below
+ * @note Rectangle positions are updated if and only if the error level is less
+ * than or equal to the accept level.
+ * @return a ProjectionResult indicating whether the projection was feasible or not.
+ * @sa solve
+ */
+ProjectionResult projectOntoCCs(vpsc::Dim dim, vpsc::Rectangles &rs, cola::CompoundConstraints ccs,
+ bool preventOverlaps, int accept=0, unsigned debugLevel=0);
+
+/**
+ * @brief Constructs a solver and attempts to solve the passed constraints on the passed vars.
+ * @param debugLevel: controls how much information comes back when the projection fails. See below.
+ * @return a ProjectionResult, containing:
+ * errorLevel:
+ * 0: all constraints were satisfiable.
+ * 1: some constraints were unsatisfiable, but they were all nonoverlap constraints.
+ * 2: some constraints were unsatisfiable which were /not/ nonoverlap constraints.
+ * unsatinfo:
+ * The amount of information reported depends on the debugLevel:
+ * 0: nothing reported (empty string)
+ * 1: description of the unsatisfied constraints
+ * 2: the info from level 1, plus a description of all "related" constraints (those sharing a variable).
+ * This is useful for understanding the conflicts.
+ */
+ProjectionResult solve(vpsc::Variables &vs, vpsc::Constraints &cs, vpsc::Rectangles &rs,
+ unsigned debugLevel=0);
+
+
+ConstrainedMajorizationLayout* simpleCMLFactory(
+ vpsc::Rectangles& rs,
+ std::vector<Edge> const & es,
+ RootCluster* clusterHierarchy,
+ const double idealLength,
+ bool useNeighbourStress = false
+ );
+
/*
* find shortest path lengths from node s to all other nodes.
* @param s starting node
diff --git a/src/3rdparty/adaptagrams/libcola/cola_log.h b/src/3rdparty/adaptagrams/libcola/cola_log.h
index c2c9419c7..5909c937e 100644
--- a/src/3rdparty/adaptagrams/libcola/cola_log.h
+++ b/src/3rdparty/adaptagrams/libcola/cola_log.h
@@ -1,7 +1,7 @@
/*
* vim: ts=4 sw=4 et tw=0 wm=0
*
- * libcola - A library providing force-directed network layout using the
+ * libcola - A library providing force-directed network layout using the
* stress-majorization method subject to separation constraints.
*
* Copyright (C) 2006-2008 Monash University
@@ -23,7 +23,7 @@ Logging code from DJJ article: http://www.ddj.com/cpp/201804215.
Title: Logging In C++
Author: Petru Marginean
-Keywords: OCT07 C++
+Keywords: OCT07 C++
Description: Unpublished source code accompanying the article by Petru Marginean, in which he presents a C++ logging framework that is typesafe, thread-safe, and portable.
*/
#ifndef __COLA_LOG_H__
@@ -32,6 +32,7 @@ Description: Unpublished source code accompanying the article by Petru Marginean
#include <sstream>
#include <string>
#include <cstdio>
+#include <iomanip>
namespace cola {
inline std::string NowTime();
@@ -128,7 +129,7 @@ inline FILE*& Output2FILE::Stream()
}
inline void Output2FILE::Output(const std::string& msg)
-{
+{
FILE* pStream = Stream();
if (!pStream)
return;
@@ -168,14 +169,14 @@ inline std::string NowTime()
{
const int MAX_LEN = 200;
char buffer[MAX_LEN];
- if (GetTimeFormatA(LOCALE_USER_DEFAULT, 0, 0,
+ if (GetTimeFormatA(LOCALE_USER_DEFAULT, 0, 0,
"HH':'mm':'ss", buffer, MAX_LEN) == 0)
return "Error in NowTime()";
- char result[100] = {0};
static DWORD first = GetTickCount();
- std::sprintf(result, "%s.%03ld", buffer, (long)(GetTickCount() - first) % 1000);
- return result;
+ std::stringstream result;
+ result << buffer << "." << std::setfill('0') << std::setw(3) << ((long)(GetTickCount() - first) % 1000);
+ return result.str();
}
#else
@@ -191,9 +192,9 @@ inline std::string NowTime()
strftime(buffer, sizeof(buffer), "%X", localtime_r(&t, &r));
struct timeval tv;
gettimeofday(&tv, 0);
- char result[100] = {0};
- std::sprintf(result, "%s.%03ld", buffer, (long)tv.tv_usec / 1000);
- return result;
+ std::stringstream result;
+ result << buffer << "." << std::setfill('0') << std::setw(3) << ((long)tv.tv_usec / 1000);
+ return result.str();
}
#endif //WIN32
diff --git a/src/3rdparty/adaptagrams/libcola/colafd.cpp b/src/3rdparty/adaptagrams/libcola/colafd.cpp
index 748f3354b..8476f6b10 100644
--- a/src/3rdparty/adaptagrams/libcola/colafd.cpp
+++ b/src/3rdparty/adaptagrams/libcola/colafd.cpp
@@ -1,7 +1,7 @@
/*
* vim: ts=4 sw=4 et tw=0 wm=0
*
- * libcola - A library providing force-directed network layout using the
+ * libcola - A library providing force-directed network layout using the
* stress-majorization method subject to separation constraints.
*
* Copyright (C) 2006-2015 Monash University
@@ -14,7 +14,7 @@
*
* 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Author(s): Tim Dwyer
* Michael Wybrow
@@ -32,6 +32,7 @@
#include "libvpsc/variable.h"
#include "libvpsc/constraint.h"
#include "libvpsc/rectangle.h"
+#include "libvpsc/exceptions.h"
#include "libcola/commondefs.h"
#include "libcola/cola.h"
@@ -49,8 +50,16 @@
#include "libcola/cola_log.h"
using namespace std;
+using vpsc::Dim;
using vpsc::XDIM;
using vpsc::YDIM;
+using vpsc::IncSolver;
+using vpsc::Variable;
+using vpsc::Variables;
+using vpsc::Constraint;
+using vpsc::Constraints;
+using vpsc::Rectangle;
+using vpsc::Rectangles;
namespace cola {
@@ -65,7 +74,7 @@ inline double dotProd(valarray<double> x, valarray<double> y) {
COLA_ASSERT(x.size()==y.size());
double dp=0;
for(unsigned i=0;i<x.size();i++) {
- dp+=x[i]*y[i];
+ dp+=x[i]*y[i];
}
return dp;
}
@@ -75,7 +84,7 @@ void dumpSquareMatrix(unsigned n, T** L) {
for(unsigned i=0;i<n;i++) {
printf("{");
for(unsigned j=0;j<n;j++) {
- std::cout<<L[i][j]<<std::endl;;
+ std::cout<<L[i][j];
char c=j==n-1?'}':',';
printf("%c",c);
}
@@ -96,22 +105,25 @@ ConstrainedFDLayout::ConstrainedFDLayout(const vpsc::Rectangles& rs,
preIteration(preIteration),
topologyAddon(new TopologyAddonInterface()),
rungekutta(true),
- desiredPositions(NULL),
- clusterHierarchy(NULL),
+ desiredPositions(nullptr),
+ clusterHierarchy(nullptr),
rectClusterBuffer(0),
m_idealEdgeLength(idealLength),
m_generateNonOverlapConstraints(false),
+ m_useNeighbourStress(false),
m_edge_lengths(eLengths.data(), eLengths.size()),
m_nonoverlap_exemptions(new NonOverlapConstraintExemptions())
{
minD = DBL_MAX;
- if (done == NULL)
+ if (done == nullptr)
{
done = new TestConvergence();
using_default_done = true;
}
+ computeNeighbours(es);
+
//FILELog::ReportingLevel() = logDEBUG1;
FILELog::ReportingLevel() = logERROR;
boundingBoxes = rs;
@@ -132,7 +144,43 @@ ConstrainedFDLayout::ConstrainedFDLayout(const vpsc::Rectangles& rs,
computePathLengths(es,m_edge_lengths);
}
-void dijkstra(const unsigned s, const unsigned n, double* d,
+std::vector<double> ConstrainedFDLayout::readLinearD(void)
+{
+ std::vector<double> d;
+ d.resize(n*n);
+ for (unsigned i = 0; i < n; ++i) {
+ for (unsigned j = 0; j < n; ++j) {
+ d[n*i + j] = D[i][j];
+ }
+ }
+ return d;
+}
+
+std::vector<unsigned> ConstrainedFDLayout::readLinearG(void)
+{
+ std::vector<unsigned> g;
+ g.resize(n*n);
+ for (unsigned i = 0; i < n; ++i) {
+ for (unsigned j = 0; j < n; ++j) {
+ g[n*i + j] = G[i][j];
+ }
+ }
+ return g;
+}
+
+void ConstrainedFDLayout::computeNeighbours(vector<Edge> es) {
+ for (unsigned i = 0; i < n; ++i) {
+ neighbours.push_back(vector<unsigned>(n));
+ }
+ for (vector<Edge>::iterator it = es.begin(); it!=es.end(); ++it) {
+ Edge e = *it;
+ unsigned s = e.first, t = e.second;
+ neighbours[s][t] = 1;
+ neighbours[t][s] = 1;
+ }
+}
+
+void dijkstra(const unsigned s, const unsigned n, double* d,
const vector<Edge>& es, const std::valarray<double> & eLengths)
{
shortest_paths::dijkstra(s,n,d,es,eLengths);
@@ -150,6 +198,10 @@ void ConstrainedFDLayout::setAvoidNodeOverlaps(bool avoidOverlaps,
m_nonoverlap_exemptions->addExemptGroupOfNodes(listOfNodeGroups);
}
+void ConstrainedFDLayout::setUseNeighbourStress(bool useNeighbourStress)
+{
+ m_useNeighbourStress = useNeighbourStress;
+}
void ConstrainedFDLayout::setDesiredPositions(DesiredPositions *desiredPositions)
{
@@ -160,10 +212,10 @@ void ConstrainedFDLayout::setDesiredPositions(DesiredPositions *desiredPositions
/*
* Sets up the D and G matrices. D is the required euclidean distances
* between pairs of nodes based on the shortest paths between them (using
- * m_idealEdgeLength*eLengths[edge] as the edge length, if eLengths array
- * is provided otherwise just m_idealEdgeLength). G is a matrix of
+ * m_idealEdgeLength*eLengths[edge] as the edge length, if eLengths array
+ * is provided otherwise just m_idealEdgeLength). G is a matrix of
* unsigned ints such that G[u][v]=
- * 0 if there are no forces required between u and v
+ * 0 if there are no forces required between u and v
* (for example, if u and v are in unconnected components)
* 1 if attractive forces are required between u and v
* (i.e. if u and v are immediately connected by an edge and there is
@@ -173,7 +225,7 @@ void ConstrainedFDLayout::setDesiredPositions(DesiredPositions *desiredPositions
* a connected path between them.
*/
void ConstrainedFDLayout::computePathLengths(
- const vector<Edge>& es, std::valarray<double> eLengths)
+ const vector<Edge>& es, std::valarray<double> eLengths)
{
// Correct zero or negative entries in eLengths array.
for (size_t i = 0; i < eLengths.size(); ++i)
@@ -209,7 +261,7 @@ void ConstrainedFDLayout::computePathLengths(
if (minD == DBL_MAX) minD = 1;
for(vector<Edge>::const_iterator e=es.begin();e!=es.end();++e) {
- unsigned u=e->first, v=e->second;
+ unsigned u=e->first, v=e->second;
G[u][v]=G[v][u]=1;
}
topologyAddon->computePathLengths(G);
@@ -258,10 +310,10 @@ void ConstrainedFDLayout::computeDescentVectorOnBothAxes(
/*
* run() implements the main layout loop, taking descent steps until
* stress is no-longer significantly reduced.
- * done is a callback used to check stress but also to report updated
+ * done is a callback used to check stress but also to report updated
* positions.
*/
-void ConstrainedFDLayout::run(const bool xAxis, const bool yAxis)
+void ConstrainedFDLayout::run(const bool xAxis, const bool yAxis)
{
// This generates constraints for non-overlap inside and outside
// of clusters. To assign correct variable indexes it requires
@@ -312,7 +364,7 @@ void ConstrainedFDLayout::run(const bool xAxis, const bool yAxis)
FILE_LOG(logDEBUG) << *r;
}
FILE_LOG(logDEBUG) << "ConstrainedFDLayout::run done.";
-
+
// Clear extra constraints.
for_each(extraConstraints.begin(), extraConstraints.end(), delete_object());
extraConstraints.clear();
@@ -353,8 +405,8 @@ void ConstrainedFDLayout::runOnce(const bool xAxis, const bool yAxis) {
}
-// Used for sorting the CompoundConstraints from lowest priority to highest.
-static bool cmpCompoundConstraintPriority(const cola::CompoundConstraint *lhs,
+// Used for sorting the CompoundConstraints from lowest priority to highest.
+static bool cmpCompoundConstraintPriority(const cola::CompoundConstraint *lhs,
const cola::CompoundConstraint *rhs)
{
return lhs->priority() < rhs->priority();
@@ -362,52 +414,52 @@ static bool cmpCompoundConstraintPriority(const cola::CompoundConstraint *lhs,
void ConstrainedFDLayout::recGenerateClusterVariablesAndConstraints(
- vpsc::Variables (&vars)[2], unsigned int& priority,
- cola::NonOverlapConstraints *noc, Cluster *cluster,
+ vpsc::Variables (&vars)[2], unsigned int& priority,
+ cola::NonOverlapConstraints *noc, Cluster *cluster,
cola::CompoundConstraints& idleConstraints)
{
for (std::vector<Cluster*>::iterator curr = cluster->clusters.begin();
curr != cluster->clusters.end(); ++curr)
{
// For each of the child clusters, recursively call this function.
- recGenerateClusterVariablesAndConstraints(vars, priority,
+ recGenerateClusterVariablesAndConstraints(vars, priority,
noc, *curr, idleConstraints);
}
- if ( (noc == NULL) && (dynamic_cast<RootCluster *> (cluster) == NULL) )
+ if ( (noc == nullptr) && (dynamic_cast<RootCluster *> (cluster) == nullptr) )
{
double freeWeight = 0.00000000001;
- // Then create left and right variables for the boundary of this
+ // Then create left and right variables for the boundary of this
// cluster.
- vpsc::Variable *variable = NULL;
+ vpsc::Variable *variable = nullptr;
cluster->clusterVarId = vars[XDIM].size();
COLA_ASSERT(vars[XDIM].size() == vars[YDIM].size());
// Left:
- variable = new vpsc::Variable(vars[XDIM].size(),
+ variable = new vpsc::Variable(vars[XDIM].size(),
cluster->bounds.getMinX(), freeWeight);
vars[XDIM].push_back(variable);
// Right:
- variable = new vpsc::Variable(vars[XDIM].size(),
+ variable = new vpsc::Variable(vars[XDIM].size(),
cluster->bounds.getMaxX(), freeWeight);
vars[XDIM].push_back(variable);
// Bottom::
- variable = new vpsc::Variable(vars[YDIM].size(),
+ variable = new vpsc::Variable(vars[YDIM].size(),
cluster->bounds.getMinY(), freeWeight);
vars[YDIM].push_back(variable);
// Top:
- variable = new vpsc::Variable(vars[YDIM].size(),
+ variable = new vpsc::Variable(vars[YDIM].size(),
cluster->bounds.getMaxY(), freeWeight);
vars[YDIM].push_back(variable);
RectangularCluster *rc = dynamic_cast<RectangularCluster *> (cluster);
if (rc)
{
- rc->generateFixedRectangleConstraints(idleConstraints,
+ rc->generateFixedRectangleConstraints(idleConstraints,
boundingBoxes, vars);
}
priority--;
- cola::ClusterContainmentConstraints *ccc =
+ cola::ClusterContainmentConstraints *ccc =
new cola::ClusterContainmentConstraints(cluster, priority,
boundingBoxes);
idleConstraints.push_back(ccc);
@@ -415,13 +467,13 @@ void ConstrainedFDLayout::recGenerateClusterVariablesAndConstraints(
if (noc)
{
- // Enforce non-overlap between all the shapes and clusters at this
+ // Enforce non-overlap between all the shapes and clusters at this
// level.
//printf("Cluster #%d non-overlap constraints - nodes %d clusters %d\n",
- // (int) cluster->clusterVarId, (int) cluster->nodes.size(),
+ // (int) cluster->clusterVarId, (int) cluster->nodes.size(),
// (int) cluster->clusters.size());
unsigned int group = cluster->clusterVarId;
- // The set of clusters to put non-overlap constraints between is the
+ // The set of clusters to put non-overlap constraints between is the
// child clusters of this cluster. We will also add any overlapping
// clusters (due to multiple inheritence) to this set.
std::set<Cluster *> expandedClusterSet(cluster->clusters.begin(),
@@ -433,13 +485,13 @@ void ConstrainedFDLayout::recGenerateClusterVariablesAndConstraints(
if (cluster->m_overlap_replacement_map.count(id) > 0)
{
- // This shape is child of another cluster also, so replace
+ // This shape is child of another cluster also, so replace
// this node with the other cluster for the purpose of
// non-overlap with other children of the current cluster.
expandedClusterSet.insert(
cluster->m_overlap_replacement_map[id]);
}
- // Normal case: Add shape for generation of non-overlap
+ // Normal case: Add shape for generation of non-overlap
// constraints.
noc->addShape(id, boundingBoxes[id]->width() / 2,
boundingBoxes[id]->height() / 2, group);
@@ -448,7 +500,7 @@ void ConstrainedFDLayout::recGenerateClusterVariablesAndConstraints(
curr != expandedClusterSet.end(); ++curr)
{
Cluster *cluster = *curr;
- RectangularCluster *rectCluster =
+ RectangularCluster *rectCluster =
dynamic_cast<RectangularCluster *> (cluster);
if (rectCluster && rectCluster->clusterIsFromFixedRectangle())
{
@@ -464,11 +516,11 @@ void ConstrainedFDLayout::recGenerateClusterVariablesAndConstraints(
}
}
- // For the set of shapes that have been replaced due to multiple
+ // For the set of shapes that have been replaced due to multiple
// inheritance, still generate overlap constraints between them.
- // (The group uses the ID of the right side variable of the cluster
+ // (The group uses the ID of the right side variable of the cluster
// so it is not the same group as the cluster itself.)
- for (std::set<unsigned>::iterator curr =
+ for (std::set<unsigned>::iterator curr =
cluster->m_nodes_replaced_with_clusters.begin();
curr != cluster->m_nodes_replaced_with_clusters.end(); ++curr)
{
@@ -499,7 +551,7 @@ void ConstrainedFDLayout::generateNonOverlapAndClusterCompoundConstraints(
fprintf(stderr, "Warning: node %u is contained in %d "
"clusters.\n", i, count);
}
-
+
if (count == 0)
{
// Not present in hierarchy, so add to root cluster.
@@ -511,25 +563,25 @@ void ConstrainedFDLayout::generateNonOverlapAndClusterCompoundConstraints(
// and nodes.
unsigned int priority = PRIORITY_NONOVERLAP;
clusterHierarchy->computeBoundingRect(boundingBoxes);
-
+
// Generate the containment constraints
- recGenerateClusterVariablesAndConstraints(vs, priority,
- NULL, clusterHierarchy, extraConstraints);
-
+ recGenerateClusterVariablesAndConstraints(vs, priority,
+ nullptr, clusterHierarchy, extraConstraints);
+
// Compute overlapping clusters.
clusterHierarchy->calculateClusterPathsToEachNode(boundingBoxes.size());
- // Generate non-overlap constraints between all clusters and
+ // Generate non-overlap constraints between all clusters and
// all contained nodes.
if (m_generateNonOverlapConstraints)
{
priority--;
- cola::NonOverlapConstraints *noc =
+ cola::NonOverlapConstraints *noc =
new cola::NonOverlapConstraints(m_nonoverlap_exemptions,
priority);
noc->setClusterClusterExemptions(
clusterHierarchy->m_cluster_cluster_overlap_exceptions);
- recGenerateClusterVariablesAndConstraints(vs, priority,
+ recGenerateClusterVariablesAndConstraints(vs, priority,
noc, clusterHierarchy, extraConstraints);
extraConstraints.push_back(noc);
}
@@ -538,7 +590,7 @@ void ConstrainedFDLayout::generateNonOverlapAndClusterCompoundConstraints(
{
// Add standard non-overlap constraints between each pair of
// nodes.
- cola::NonOverlapConstraints *noc =
+ cola::NonOverlapConstraints *noc =
new cola::NonOverlapConstraints(m_nonoverlap_exemptions);
for (unsigned int i = 0; i < boundingBoxes.size(); ++i)
{
@@ -549,22 +601,22 @@ void ConstrainedFDLayout::generateNonOverlapAndClusterCompoundConstraints(
}
}
-void ConstrainedFDLayout::makeFeasible(void)
+void ConstrainedFDLayout::makeFeasible(double xBorder, double yBorder)
{
vpsc::Variables vs[2];
vpsc::Constraints valid[2];
- vpsc::Rectangle::setXBorder(1);
- vpsc::Rectangle::setYBorder(1);
-
+ vpsc::Rectangle::setXBorder(xBorder);
+ vpsc::Rectangle::setYBorder(yBorder);
+
// Populate all the variables for shapes.
for (unsigned int dim = 0; dim < 2; ++dim)
{
vs[dim] = vpsc::Variables(boundingBoxes.size());
for (unsigned int i = 0; i < vs[dim].size(); ++i)
{
- double pos = (dim == 0) ?
- boundingBoxes[i]->getCentreX() :
+ double pos = (dim == 0) ?
+ boundingBoxes[i]->getCentreX() :
boundingBoxes[i]->getCentreY();
vs[dim][i] = new vpsc::Variable(i, pos, 1);
}
@@ -577,10 +629,10 @@ void ConstrainedFDLayout::makeFeasible(void)
// Make a copy of the compound constraints and sort them by priority.
cola::CompoundConstraints idleConstraints = ccs;
// Append extraConstraints to idleConstraints.
- idleConstraints.insert(idleConstraints.end(),
+ idleConstraints.insert(idleConstraints.end(),
extraConstraints.begin(), extraConstraints.end());
- std::sort(idleConstraints.begin(), idleConstraints.end(),
+ std::sort(idleConstraints.begin(), idleConstraints.end(),
cmpCompoundConstraintPriority);
// Initialise extra variables for compound constraints.
@@ -590,7 +642,6 @@ void ConstrainedFDLayout::makeFeasible(void)
}
#ifdef MAKEFEASIBLE_DEBUG
- char filename[200];
int iteration = 0;
vector<string> labels(boundingBoxes.size());
for(unsigned i=0;i<boundingBoxes.size();++i)
@@ -604,52 +655,55 @@ void ConstrainedFDLayout::makeFeasible(void)
// We can keep adding new constraints to the existing VPSC instances so
// long as everything is satisfiable. Only when it's not do we discard
// the existing VPSC instance for that dimension and create a new one.
- vpsc::IncSolver *solver[2] = { NULL };
+ vpsc::IncSolver *solver[2] = { nullptr };
// Main makeFeasible loop.
while (!idleConstraints.empty())
{
- // idleConstraints is sorted lowest to highest priority, so the
+ // idleConstraints is sorted lowest to highest priority, so the
// highest priority constraint will be at the back of the vector.
cola::CompoundConstraint *cc = idleConstraints.back();
idleConstraints.pop_back();
#ifdef MAKEFEASIBLE_DEBUG
- // Debugging SVG time slice output.
- std::vector<cola::Edge> es;
- for (unsigned int i = 0; i < boundingBoxes.size(); ++i)
{
- boundingBoxes[i]->moveCentreX(vs[0][i]->finalPosition);
- boundingBoxes[i]->moveCentreY(vs[1][i]->finalPosition);
- }
- iteration++;
- sprintf(filename, "out/file-%05d.pdf", iteration);
+ // Debugging SVG time slice output.
+ std::vector<cola::Edge> es;
+ for (unsigned int i = 0; i < boundingBoxes.size(); ++i)
+ {
+ boundingBoxes[i]->moveCentreX(vs[0][i]->finalPosition);
+ boundingBoxes[i]->moveCentreY(vs[1][i]->finalPosition);
+ }
+ iteration++;
+ std::sstream filename;
+ filename << "out/file-" << std::setfill('0') << std::setw(5) << iteration << ".pdf";
- OutputFile of(boundingBoxes,es,clusterHierarchy,filename,true,false);
- of.setLabels(labels);
- of.generate();
+ OutputFile of(boundingBoxes,es,clusterHierarchy,filename.str().c_str(),true,false);
+ of.setLabels(labels);
+ of.generate();
+ }
#endif
cc->markAllSubConstraintsAsInactive();
bool subConstraintSatisfiable = true;
-
+
if (cc->shouldCombineSubConstraints())
{
// We are processing a combined set of satisfiable constraints,
// such as for containment within cluster boundary variables, so
// we just add all the required constraints and solve in both
- // the X and Y dimension once to set the cluster boundaries to
+ // the X and Y dimension once to set the cluster boundaries to
// meaningful values.
while (cc->subConstraintsRemaining())
{
- cola::SubConstraintAlternatives alternatives =
+ cola::SubConstraintAlternatives alternatives =
cc->getCurrSubConstraintAlternatives(vs);
// There should be no alternatives, just guaranteed
// satisfiable constraints.
COLA_ASSERT(alternatives.size() == 1);
vpsc::Dim& dim = alternatives.front().dim;
vpsc::Constraint& constraint = alternatives.front().constraint;
- vpsc::Constraint *newConstraint =
+ vpsc::Constraint *newConstraint =
new vpsc::Constraint(constraint);
valid[dim].push_back(newConstraint);
if (solver[dim])
@@ -663,7 +717,7 @@ void ConstrainedFDLayout::makeFeasible(void)
// Satisfy the constraints in each dimension.
for (size_t dim = 0; dim < 2; ++dim)
{
- if (solver[dim] == NULL)
+ if (solver[dim] == nullptr)
{
// Create a new VPSC solver if necessary.
solver[dim] = new vpsc::IncSolver(vs[dim], valid[dim]);
@@ -675,7 +729,7 @@ void ConstrainedFDLayout::makeFeasible(void)
while (cc->subConstraintsRemaining())
{
- cola::SubConstraintAlternatives alternatives =
+ cola::SubConstraintAlternatives alternatives =
cc->getCurrSubConstraintAlternatives(vs);
alternatives.sort();
@@ -691,7 +745,7 @@ void ConstrainedFDLayout::makeFeasible(void)
vpsc::Dim& dim = alternatives.front().dim;
vpsc::Constraint& constraint = alternatives.front().constraint;
-
+
// Store current values for variables.
for (unsigned int i = 0; i < priorPos.size(); ++i)
{
@@ -699,18 +753,18 @@ void ConstrainedFDLayout::makeFeasible(void)
}
// Some solving...
- try
+ try
{
- // Add the constraint from this alternative to the
+ // Add the constraint from this alternative to the
// valid constraint set.
- vpsc::Constraint *newConstraint =
+ vpsc::Constraint *newConstraint =
new vpsc::Constraint(constraint);
valid[dim].push_back(newConstraint);
//fprintf(stderr, ".%d %3d - ", dim, valid[dim].size());
-
+
// Try to satisfy this set of constraints..
- if (solver[dim] == NULL)
+ if (solver[dim] == nullptr)
{
// Create a new VPSC solver if necessary.
solver[dim] = new vpsc::IncSolver(vs[dim], valid[dim]);
@@ -722,46 +776,46 @@ void ConstrainedFDLayout::makeFeasible(void)
}
solver[dim]->satisfy();
}
- catch (char *str)
+ catch (char *str)
{
subConstraintSatisfiable = false;
-
+
std::cerr << "++++ IN ERROR BLOCK" << std::endl;
std::cerr << str << std::endl;
- for (vpsc::Rectangles::iterator r = boundingBoxes.begin();
- r != boundingBoxes.end(); ++r)
+ for (vpsc::Rectangles::iterator r = boundingBoxes.begin();
+ r != boundingBoxes.end(); ++r)
{
std::cerr << **r <<std::endl;
}
}
- for (size_t i = 0; i < valid[dim].size(); ++i)
+ for (size_t i = 0; i < valid[dim].size(); ++i)
{
- if (valid[dim][i]->unsatisfiable)
+ if (valid[dim][i]->unsatisfiable)
{
- // It might have made one of the earlier added
- // constraints unsatisfiable, so we mark that one
- // as okay since we will be reverting the most
+ // It might have made one of the earlier added
+ // constraints unsatisfiable, so we mark that one
+ // as okay since we will be reverting the most
// recent one.
valid[dim][i]->unsatisfiable = false;
-
+
subConstraintSatisfiable = false;
}
}
if (!subConstraintSatisfiable)
{
- // Since we had unsatisfiable constraints we must
+ // Since we had unsatisfiable constraints we must
// discard this solver instance.
delete solver[dim];
- solver[dim] = NULL;
+ solver[dim] = nullptr;
// Restore previous values for variables.
for (unsigned int i = 0; i < priorPos.size(); ++i)
{
vs[dim][i]->finalPosition = priorPos[i];
}
-
- // Delete the newly added (and unsatisfiable)
+
+ // Delete the newly added (and unsatisfiable)
// constraint from the valid constraint set.
delete valid[dim].back();
valid[dim].pop_back();
@@ -786,9 +840,10 @@ void ConstrainedFDLayout::makeFeasible(void)
boundingBoxes[i]->moveCentreY(vs[1][i]->finalPosition);
}
iteration++;
- sprintf(filename, "out/file-%05d.pdf", iteration);
+ std::sstream filename;
+ filename << "out/file-" << std::setfill('0') << std::setw(5) << iteration << ".pdf";
- OutputFile of(boundingBoxes,es,clusterHierarchy,filename,
+ OutputFile of(boundingBoxes,es,clusterHierarchy,filename.str().c_str(),
true,false);
of.setLabels(labels);
of.generate();
@@ -804,7 +859,7 @@ void ConstrainedFDLayout::makeFeasible(void)
if (solver[dim])
{
delete solver[dim];
- solver[dim] = NULL;
+ solver[dim] = nullptr;
}
}
@@ -827,14 +882,14 @@ void ConstrainedFDLayout::makeFeasible(void)
topologyAddon->makeFeasible(m_generateNonOverlapConstraints,
boundingBoxes, clusterHierarchy);
-
+
// Update the X and Y vectors with the new shape positions.
for (unsigned int i = 0; i < boundingBoxes.size(); ++i)
{
X[i] = boundingBoxes[i]->getCentreX();
Y[i] = boundingBoxes[i]->getCentreY();
}
-
+
// Clear extra constraints for cluster containment and non-overlap.
for_each(extraConstraints.begin(), extraConstraints.end(), delete_object());
extraConstraints.clear();
@@ -863,7 +918,7 @@ void ConstrainedFDLayout::freeAssociatedObjects(void)
// Free Rectangles
for_each(boundingBoxes.begin(), boundingBoxes.end(), delete_object());
boundingBoxes.clear();
-
+
// Free compound constraints
std::list<CompoundConstraint *> freeList(ccs.begin(), ccs.end());
freeList.sort();
@@ -880,9 +935,9 @@ void ConstrainedFDLayout::freeAssociatedObjects(void)
if (clusterHierarchy)
{
delete clusterHierarchy;
- clusterHierarchy = NULL;
+ clusterHierarchy = nullptr;
}
-
+
topologyAddon->freeAssociatedObjects();
}
@@ -902,8 +957,8 @@ TopologyAddonInterface *ConstrainedFDLayout::getTopology(void)
void setupVarsAndConstraints(unsigned n, const CompoundConstraints& ccs,
const vpsc::Dim dim, vpsc::Rectangles& boundingBoxes,
RootCluster *clusterHierarchy,
- vpsc::Variables& vs, vpsc::Constraints& cs,
- valarray<double> &coords)
+ vpsc::Variables& vs, vpsc::Constraints& cs,
+ valarray<double> &coords)
{
vs.resize(n);
for (unsigned i = 0; i < n; ++i)
@@ -919,12 +974,12 @@ void setupVarsAndConstraints(unsigned n, const CompoundConstraints& ccs,
}
for (CompoundConstraints::const_iterator c = ccs.begin();
- c != ccs.end(); ++c)
+ c != ccs.end(); ++c)
{
(*c)->generateVariables(dim, vs);
}
for (CompoundConstraints::const_iterator c = ccs.begin();
- c != ccs.end(); ++c)
+ c != ccs.end(); ++c)
{
(*c)->generateSeparationConstraints(dim, vs, cs, boundingBoxes);
}
@@ -936,22 +991,22 @@ static void setupExtraConstraints(const CompoundConstraints& ccs,
vpsc::Rectangles& boundingBoxes)
{
for (CompoundConstraints::const_iterator c = ccs.begin();
- c != ccs.end(); ++c)
+ c != ccs.end(); ++c)
{
(*c)->generateVariables(dim, vs);
}
for (CompoundConstraints::const_iterator c = ccs.begin();
- c != ccs.end(); ++c)
+ c != ccs.end(); ++c)
{
(*c)->generateSeparationConstraints(dim, vs, cs, boundingBoxes);
}
}
void updateCompoundConstraints(const vpsc::Dim dim,
- const CompoundConstraints& ccs)
+ const CompoundConstraints& ccs)
{
for (CompoundConstraints::const_iterator c = ccs.begin();
- c != ccs.end(); ++c)
+ c != ccs.end(); ++c)
{
(*c)->updatePosition(dim);
}
@@ -984,7 +1039,7 @@ void setVariableDesiredPositions(vpsc::Variables& vs, vpsc::Constraints& cs,
v->weight=10000;
}
}
-void checkUnsatisfiable(const vpsc::Constraints& cs,
+void checkUnsatisfiable(const vpsc::Constraints& cs,
UnsatisfiableConstraintInfos* unsatisfiable) {
for(vpsc::Constraints::const_iterator c=cs.begin();c!=cs.end();++c) {
if((*c)->unsatisfiable) {
@@ -999,6 +1054,7 @@ void ConstrainedFDLayout::handleResizes(const Resizes& resizeList)
topologyAddon->handleResizes(resizeList, n, X, Y, ccs, boundingBoxes,
clusterHierarchy);
}
+
/*
* move positions of nodes in specified axis while respecting constraints
* @param dim axis
@@ -1067,7 +1123,7 @@ double ConstrainedFDLayout::applyForcesAndConstraints(const vpsc::Dim dim, const
if (topologyAddon->useTopologySolver())
{
- stress = topologyAddon->applyForcesAndConstraints(this, dim, g, vs, cs,
+ stress = topologyAddon->applyForcesAndConstraints(this, dim, g, vs, cs,
coords, des, oldStress);
} else {
// Add non-overlap constraints, but not variables again.
@@ -1150,7 +1206,7 @@ std::vector<double> ConstrainedFDLayout::offsetDir(double minD)
l += x * x;
}
l = sqrt(l);
-
+
for (size_t i = 0; i < 2; ++i)
{
u[i] *= (minD / l);
@@ -1162,7 +1218,7 @@ std::vector<double> ConstrainedFDLayout::offsetDir(double minD)
/*
* Computes:
- * - the matrix of second derivatives (the Hessian) H, used in
+ * - the matrix of second derivatives (the Hessian) H, used in
* calculating stepsize; and
* - the vector g, the negative gradient (steepest-descent) direction.
*/
@@ -1178,19 +1234,20 @@ void ConstrainedFDLayout::computeForces(
double Huu=0;
for(unsigned v=0;v<n;v++) {
if(u==v) continue;
+ if (m_useNeighbourStress && neighbours[u][v]!=1) continue;
// The following loop randomly displaces nodes that are at identical positions
double rx=X[u]-X[v], ry=Y[u]-Y[v];
double sd2 = rx*rx+ry*ry;
unsigned maxDisplaces = n; // avoid infinite loop in the case of numerical issues, such as huge values
- while (maxDisplaces--)
+ while (maxDisplaces--)
{
- if ((sd2) > 1e-3)
+ if ((sd2) > 1e-3)
{
break;
}
-
+
std::vector<double> rd = offsetDir(minD);
X[v] += rd[0];
Y[v] += rd[1];
@@ -1229,12 +1286,12 @@ void ConstrainedFDLayout::computeForces(
}
}
/*
- * Returns the optimal step-size in the direction d, given gradient g and
+ * Returns the optimal step-size in the direction d, given gradient g and
* hessian H.
*/
double ConstrainedFDLayout::computeStepSize(
- SparseMatrix const &H,
- valarray<double> const &g,
+ SparseMatrix const &H,
+ valarray<double> const &g,
valarray<double> const &d) const
{
COLA_ASSERT(g.size()==d.size());
@@ -1259,6 +1316,7 @@ double ConstrainedFDLayout::computeStress() const {
double stress=0;
for(unsigned u=0;(u + 1)<n;u++) {
for(unsigned v=u+1;v<n;v++) {
+ if (m_useNeighbourStress && neighbours[u][v]!=1) continue;
unsigned short p=G[u][v];
// no forces between disconnected parts of the graph
if(p==0) continue;
@@ -1322,7 +1380,7 @@ void ConstrainedFDLayout::outputInstanceToSVG(std::string instanceName)
filename += ".svg";
FILE *fp = fopen(filename.c_str(), "w");
- if (fp == NULL)
+ if (fp == nullptr)
{
return;
}
@@ -1340,12 +1398,12 @@ void ConstrainedFDLayout::outputInstanceToSVG(std::string instanceName)
double rMaxX = boundingBoxes[i]->getMaxX();
double rMinY = boundingBoxes[i]->getMinY();
double rMaxY = boundingBoxes[i]->getMaxY();
-
+
reduceRange(rMinX);
reduceRange(rMaxX);
reduceRange(rMinY);
reduceRange(rMaxY);
-
+
if (rMinX > -LIMIT)
{
minX = std::min(minX, rMinX);
@@ -1363,7 +1421,7 @@ void ConstrainedFDLayout::outputInstanceToSVG(std::string instanceName)
maxY = std::max(maxY, rMaxY);
}
}
-
+
minX -= 50;
minY -= 50;
maxX += 50;
@@ -1384,7 +1442,7 @@ void ConstrainedFDLayout::outputInstanceToSVG(std::string instanceName)
fprintf(fp, " EdgeLengths eLengths;\n");
fprintf(fp, " double defaultEdgeLength=%g;\n", m_idealEdgeLength);
fprintf(fp, " std::vector<vpsc::Rectangle*> rs;\n");
- fprintf(fp, " vpsc::Rectangle *rect = NULL;\n\n");
+ fprintf(fp, " vpsc::Rectangle *rect = nullptr;\n\n");
for (size_t i = 0; i < boundingBoxes.size(); ++i)
{
fprintf(fp, " rect = new vpsc::Rectangle(%g, %g, %g, %g);\n",
@@ -1392,7 +1450,7 @@ void ConstrainedFDLayout::outputInstanceToSVG(std::string instanceName)
boundingBoxes[i]->getMinY(), boundingBoxes[i]->getMaxY());
fprintf(fp, " rs.push_back(rect);\n\n");
}
-
+
for (size_t i = 0; i < n; ++i)
{
for (size_t j = i + 1; j < n; ++j)
@@ -1415,7 +1473,7 @@ void ConstrainedFDLayout::outputInstanceToSVG(std::string instanceName)
fprintf(fp, "\n");
}
- for (cola::CompoundConstraints::iterator c = ccs.begin();
+ for (cola::CompoundConstraints::iterator c = ccs.begin();
c != ccs.end(); ++c)
{
(*c)->printCreationCode(fp);
@@ -1455,7 +1513,7 @@ void ConstrainedFDLayout::outputInstanceToSVG(std::string instanceName)
double maxX = boundingBoxes[i]->getMaxX();
double minY = boundingBoxes[i]->getMinY();
double maxY = boundingBoxes[i]->getMaxY();
-
+
fprintf(fp, "<rect id=\"rect-%u\" x=\"%g\" y=\"%g\" width=\"%g\" "
"height=\"%g\" style=\"stroke-width: 1px; stroke: black; "
"fill: blue; fill-opacity: 0.3;\" />\n",
@@ -1486,5 +1544,138 @@ void ConstrainedFDLayout::outputInstanceToSVG(std::string instanceName)
fclose(fp);
}
+ProjectionResult projectOntoCCs(Dim dim, Rectangles &rs, CompoundConstraints ccs,
+ bool preventOverlaps, int accept, unsigned debugLevel)
+{
+ size_t n = rs.size();
+ // Set up nonoverlap constraints if desired.
+ NonOverlapConstraintExemptions *nocexemps = nullptr;
+ NonOverlapConstraints *noc = nullptr;
+ if (preventOverlaps) {
+ nocexemps = new NonOverlapConstraintExemptions();
+ noc = new NonOverlapConstraints(nocexemps);
+ for (size_t i = 0; i < n; ++i) {
+ noc->addShape(i, rs[i]->width()/2.0, rs[i]->height()/2.0);
+ }
+ ccs.push_back(noc);
+ }
+ // Set up vars and constraints.
+ Variables vs;
+ Constraints cs;
+ vs.resize(n);
+ for (size_t i = 0; i < n; ++i) {
+ vs[i] = new Variable(i, rs[i]->getCentreD(dim));
+ }
+ for (CompoundConstraints::iterator it=ccs.begin(); it!=ccs.end(); ++it) {
+ CompoundConstraint *cc = *it;
+ cc->generateVariables(dim, vs);
+ cc->generateSeparationConstraints(dim, vs, cs, rs);
+ }
+ // Solve, if possible.
+ ProjectionResult result = solve(vs, cs, rs, debugLevel);
+ // If good enough, accept positions.
+ if (result.errorLevel <= accept) {
+ for (size_t i = 0; i < n; ++i) {
+ rs[i]->moveCentreD(dim, vs[i]->finalPosition);
+ }
+ }
+ // Clean up
+ for (Variables::iterator it=vs.begin(); it!=vs.end(); ++it) delete *it;
+ for (Constraints::iterator it=cs.begin(); it!=cs.end(); ++it) delete *it;
+ delete noc;
+ delete nocexemps;
+ // Return
+ return result;
+}
+
+ProjectionResult solve(Variables &vs, Constraints &cs, Rectangles &rs, unsigned debugLevel)
+{
+ int result = 0;
+ IncSolver solv(vs,cs);
+ try {
+ solv.solve();
+ } catch (vpsc::UnsatisfiedConstraint uc) {
+ }
+ for (Constraints::iterator it=cs.begin(); it!=cs.end(); it++) {
+ Constraint *c = *it;
+ if (c->unsatisfiable) {
+ CompoundConstraint *cc = (CompoundConstraint*)(c->creator);
+ if (cc->toString() == "NonOverlapConstraints()") {
+ result = 1;
+ } else {
+ result = 2;
+ break;
+ }
+ }
+ }
+ std::string unsatinfo;
+ if (debugLevel>0) {
+ std::set<Variable*> varsInvolved;
+ unsatinfo += "===================================================\n";
+ unsatinfo += "UNSATISFIED CONSTRAINTS:\n";
+ char buf [1000];
+ for (Constraints::iterator it=cs.begin(); it!=cs.end(); it++) {
+ Constraint *c = *it;
+ if (c->unsatisfiable) {
+ varsInvolved.insert(c->left);
+ varsInvolved.insert(c->right);
+ sprintf(buf, "v_%d + %f", c->left->id, c->gap);
+ unsatinfo += buf;
+ unsatinfo += c->equality ? " == " : " <= ";
+ sprintf(buf, "v_%d\n", c->right->id);
+ unsatinfo += buf;
+ if ((unsigned) c->left->id < rs.size()) {
+ Rectangle *r = rs[c->left->id];
+ sprintf(buf, " v_%d rect: [%f, %f] x [%f, %f]\n", c->left->id,
+ r->getMinX(), r->getMaxX(), r->getMinY(), r->getMaxY());
+ unsatinfo += buf;
+ }
+ if ((unsigned) c->right->id < rs.size()) {
+ Rectangle *r = rs[c->right->id];
+ sprintf(buf, " v_%d rect: [%f, %f] x [%f, %f]\n", c->right->id,
+ r->getMinX(), r->getMaxX(), r->getMinY(), r->getMaxY());
+ unsatinfo += buf;
+ }
+ CompoundConstraint *cc = (CompoundConstraint*)(c->creator);
+ unsatinfo += " Creator: " + cc->toString() + "\n";
+ }
+ }
+ if (debugLevel>1) {
+ unsatinfo += "--------------------------------------------------\n";
+ unsatinfo += "RELATED CONSTRAINTS:\n";
+ std::set<Variable*>::iterator lit, rit, eit = varsInvolved.end();
+ for (Constraints::iterator it=cs.begin(); it!=cs.end(); it++) {
+ Constraint *c = *it;
+ lit = varsInvolved.find(c->left);
+ rit = varsInvolved.find(c->right);
+ if (lit != eit || rit != eit) {
+ sprintf(buf, "v_%d + %f", c->left->id, c->gap);
+ unsatinfo += buf;
+ unsatinfo += c->equality ? " == " : " <= ";
+ sprintf(buf, "v_%d\n", c->right->id);
+ unsatinfo += buf;
+ if ((unsigned) c->left->id < rs.size()) {
+ Rectangle *r = rs[c->left->id];
+ sprintf(buf, " v_%d rect: [%f, %f] x [%f, %f]\n", c->left->id,
+ r->getMinX(), r->getMaxX(), r->getMinY(), r->getMaxY());
+ unsatinfo += buf;
+ }
+ if ((unsigned) c->right->id < rs.size()) {
+ Rectangle *r = rs[c->right->id];
+ sprintf(buf, " v_%d rect: [%f, %f] x [%f, %f]\n", c->right->id,
+ r->getMinX(), r->getMaxX(), r->getMinY(), r->getMaxY());
+ unsatinfo += buf;
+ }
+ CompoundConstraint *cc = (CompoundConstraint*)(c->creator);
+ unsatinfo += " Creator: " + cc->toString() + "\n";
+ }
+ }
+ }
+ }
+ ProjectionResult pr;
+ pr.errorLevel = result;
+ pr.unsatinfo = unsatinfo;
+ return pr;
+}
} // namespace cola
diff --git a/src/3rdparty/adaptagrams/libcola/commondefs.h b/src/3rdparty/adaptagrams/libcola/commondefs.h
index 591fde57f..6d56f624b 100644
--- a/src/3rdparty/adaptagrams/libcola/commondefs.h
+++ b/src/3rdparty/adaptagrams/libcola/commondefs.h
@@ -30,11 +30,6 @@
// Microsoft Visual C++ (MS VC) specific code goes here
#include <float.h>
#include <malloc.h> // Contains _alloca
-namespace std {
-inline bool isnan(double const &x) { return _isnan(x) != 0; }
-inline bool isinf(double const &x) { return !(_finite(x) || _isnan(x)); }
-} // end std
-
#endif
#include "libvpsc/assertions.h"
diff --git a/src/3rdparty/adaptagrams/libcola/compound_constraints.cpp b/src/3rdparty/adaptagrams/libcola/compound_constraints.cpp
index e4552e606..af9fa3ef7 100644
--- a/src/3rdparty/adaptagrams/libcola/compound_constraints.cpp
+++ b/src/3rdparty/adaptagrams/libcola/compound_constraints.cpp
@@ -63,7 +63,7 @@ class Offset : public SubConstraintInfo
BoundaryConstraint::BoundaryConstraint(const vpsc::Dim dim)
: CompoundConstraint(dim),
position(0),
- variable(NULL)
+ variable(nullptr)
{
}
@@ -144,13 +144,13 @@ void BoundaryConstraint::generateSeparationConstraints(const vpsc::Dim dim,
COLA_UNUSED(bbs);
if (dim == _primaryDim)
{
- COLA_ASSERT(variable != NULL);
+ COLA_ASSERT(variable != nullptr);
for (SubConstraintInfoList::iterator o = _subConstraintInfo.begin();
o != _subConstraintInfo.end(); ++o)
{
Offset *info = static_cast<Offset *> (*o);
assertValidVariableIndex(vars, info->varIndex);
- vpsc::Constraint *constraint = NULL;
+ vpsc::Constraint *constraint = nullptr;
if (info->distOffset < 0)
{
// Constrain the objects with negative offsets to be
@@ -210,8 +210,8 @@ BoundaryConstraint::getCurrSubConstraintAlternatives(vpsc::Variables vs[])
AlignmentConstraint::AlignmentConstraint(const vpsc::Dim dim, double position)
: CompoundConstraint(dim),
- indicator(NULL),
- variable(NULL),
+ indicator(nullptr),
+ variable(nullptr),
_position(position),
_isFixed(false)
{
@@ -281,7 +281,7 @@ void AlignmentConstraint::generateSeparationConstraints(const vpsc::Dim dim,
COLA_UNUSED(bbs);
if (dim == _primaryDim)
{
- COLA_ASSERT(variable != NULL);
+ COLA_ASSERT(variable != nullptr);
// Constrain each object to be offset from the guideline by
// some exact amount.
for (SubConstraintInfoList::iterator o = _subConstraintInfo.begin();
@@ -406,8 +406,8 @@ class VarIndexPair : public SubConstraintInfo
public:
VarIndexPair(unsigned ind1, unsigned ind2)
: SubConstraintInfo(ind1),
- lConstraint(NULL),
- rConstraint(NULL),
+ lConstraint(nullptr),
+ rConstraint(nullptr),
varIndex2(ind2)
{
}
@@ -445,7 +445,7 @@ SeparationConstraint::SeparationConstraint(const vpsc::Dim dim,
: CompoundConstraint(dim),
gap(g),
equality(equality),
- vpscConstraint(NULL)
+ vpscConstraint(nullptr)
{
_subConstraintInfo.push_back(new VarIndexPair(l, r));
}
@@ -588,7 +588,7 @@ unsigned SeparationConstraint::right(void) const
void SeparationConstraint::setSeparation(double gap)
{
this->gap = gap;
- if (vpscConstraint != NULL)
+ if (vpscConstraint != nullptr)
{
vpscConstraint->gap = gap;
}
@@ -604,7 +604,7 @@ OrthogonalEdgeConstraint::OrthogonalEdgeConstraint(const vpsc::Dim dim,
: CompoundConstraint(dim),
left(l),
right(r),
- vpscConstraint(NULL)
+ vpscConstraint(nullptr)
{
}
@@ -621,7 +621,7 @@ void OrthogonalEdgeConstraint::generateVariables(const vpsc::Dim dim,
void OrthogonalEdgeConstraint::printCreationCode(FILE *fp) const
{
- fprintf(fp, " /* OrthogonalEdgeConstraint *orthogonal%llu = NULL; */\n\n",
+ fprintf(fp, " /* OrthogonalEdgeConstraint *orthogonal%llu = nullptr; */\n\n",
(unsigned long long) this);
}
@@ -750,7 +750,7 @@ class AlignmentPair : public SubConstraintInfo
MultiSeparationConstraint::MultiSeparationConstraint(const vpsc::Dim dim,
double minSep, bool equality)
: CompoundConstraint(dim),
- indicator(NULL),
+ indicator(nullptr),
sep(minSep),
equality(equality)
{
@@ -887,7 +887,7 @@ void MultiSeparationConstraint::generateSeparationConstraints(
DistributionConstraint::DistributionConstraint(const vpsc::Dim dim)
: CompoundConstraint(dim),
- indicator(NULL)
+ indicator(nullptr)
{
}
@@ -1256,8 +1256,8 @@ PageBoundaryConstraints::PageBoundaryConstraints(double xLow, double xHigh,
actualRightMargin[i] = rightMargin[i];
leftWeight[i] = weight;
rightWeight[i] = weight;
- vl[i] = NULL;
- vr[i] = NULL;
+ vl[i] = nullptr;
+ vr[i] = nullptr;
}
}
diff --git a/src/3rdparty/adaptagrams/libcola/compound_constraints.h b/src/3rdparty/adaptagrams/libcola/compound_constraints.h
index 5f62f9edb..4d241526a 100644
--- a/src/3rdparty/adaptagrams/libcola/compound_constraints.h
+++ b/src/3rdparty/adaptagrams/libcola/compound_constraints.h
@@ -26,6 +26,8 @@
#include <set>
#include <utility>
+#include "libvpsc/rectangle.h"
+#include "libvpsc/constraint.h"
#include "libcola/sparse_matrix.h"
#include "libcola/unused.h"
diff --git a/src/3rdparty/adaptagrams/libcola/connected_components.cpp b/src/3rdparty/adaptagrams/libcola/connected_components.cpp
index a535e7448..fc65dc991 100644
--- a/src/3rdparty/adaptagrams/libcola/connected_components.cpp
+++ b/src/3rdparty/adaptagrams/libcola/connected_components.cpp
@@ -71,7 +71,7 @@ namespace cola {
map<unsigned,pair<Component*,unsigned> > &cmap) {
v->visited=true;
remaining.erase(v->listPos);
- cmap[v->id]=make_pair(component,component->node_ids.size());
+ cmap[v->id]=make_pair(component,static_cast<unsigned>(component->node_ids.size()));
component->node_ids.push_back(v->id);
component->rects.push_back(v->r);
for(unsigned i=0;i<v->neighbours.size();i++) {
diff --git a/src/3rdparty/adaptagrams/libcola/doc/description.doc b/src/3rdparty/adaptagrams/libcola/doc/description.doc
index 3f11f545f..cf8cddacb 100644
--- a/src/3rdparty/adaptagrams/libcola/doc/description.doc
+++ b/src/3rdparty/adaptagrams/libcola/doc/description.doc
@@ -13,16 +13,16 @@ libcola is part of the
<a href="http://www.adaptagrams.org/">Adaptagrams project</a>.
There are no official releases yet, though the code is stable and
available from the Adaptagrams
-<a href="https://github.com/mjwybrow/adaptagrams">github
+<a href="https://github.com/mjwybrow/adaptagrams">GitHub
repository</a>.
The API is documented using Doxygen. The documentation you are currently
reading can be obtained by running doxygen in the cola directory.
libcola is written and maintained by
-<a href="http://marvl.infotech.monash.edu/~mwybrow/">Michael Wybrow</a> and
-<a href="http://marvl.infotech.monash.edu/~dwyer/">Tim Dwyer</a>,
-members of <a href="http://marvl.infotech.monash.edu/">MArVL: the Monash Adaptive Visualisation Lab</a> at Monash University, Australia.
+<a href="http://users.monash.edu/~mwybrow/">Michael Wybrow</a> and
+<a href="http://ialab.it.monash.edu/~dwyer/">Tim Dwyer</a>,
+members of <a href="http://ialab.it.monash.edu/">Immersive Analytics Lab</a> at Monash University, Australia.
The algorithms used for ConstrainedFDLayout are described in the following papers. If you use libcola, please cite the relevant paper.
- Tim Dwyer, Kim Marriott, and Michael Wybrow. Topology preserving
diff --git a/src/3rdparty/adaptagrams/libcola/gradient_projection.cpp b/src/3rdparty/adaptagrams/libcola/gradient_projection.cpp
index 50b8d27d7..b53e87688 100644
--- a/src/3rdparty/adaptagrams/libcola/gradient_projection.cpp
+++ b/src/3rdparty/adaptagrams/libcola/gradient_projection.cpp
@@ -31,7 +31,6 @@
#include <libvpsc/solve_VPSC.h>
#include <libvpsc/variable.h>
-#include <libvpsc/isnan.h>
#include <libvpsc/constraint.h>
#include <libvpsc/assertions.h>
@@ -67,11 +66,11 @@ GradientProjection::GradientProjection(
clusterHierarchy(clusterHierarchy),
tolerance(tol),
max_iterations(max_iterations),
- sparseQ(NULL),
+ sparseQ(nullptr),
solveWithMosek(solveWithMosek),
scaling(scaling)
{
- printf("GP Instance: scaling=%d, mosek=%d\n",scaling,solveWithMosek);
+ //printf("GP Instance: scaling=%d, mosek=%d\n",scaling,solveWithMosek);
for(unsigned i=0;i<denseSize;i++) {
vars.push_back(new vpsc::Variable(i,1,1));
}
@@ -82,7 +81,7 @@ GradientProjection::GradientProjection(
// XXX: Scale can sometimes be set to infinity here when
// there are nodes not connected to any other node.
// Thus we just set the scale for such a variable to 1.
- if (!isFinite(vars[i]->scale))
+ if (!std::isfinite(vars[i]->scale))
{
vars[i]->scale = 1;
}
@@ -242,8 +241,8 @@ unsigned GradientProjection::solve(
COLA_ASSERT(linearCoefficients.size()==x.size());
COLA_ASSERT(x.size()==denseSize);
COLA_ASSERT(numStaticVars>=denseSize);
- COLA_ASSERT(sparseQ==NULL ||
- (sparseQ!=NULL && (vars.size()==sparseQ->rowSize())) );
+ COLA_ASSERT(sparseQ==nullptr ||
+ (sparseQ!=nullptr && (vars.size()==sparseQ->rowSize())) );
if(max_iterations==0) return 0;
@@ -276,8 +275,8 @@ unsigned GradientProjection::solve(
// load desired positions into vars, note that we keep desired positions
// already calculated for dummy vars
for (unsigned i=0;i<x.size();i++) {
- COLA_ASSERT(!isNaN(x[i]));
- COLA_ASSERT(isFinite(x[i]));
+ COLA_ASSERT(!std::isnan(x[i]));
+ COLA_ASSERT(std::isfinite(x[i]));
b[i]=i<linearCoefficients.size()?linearCoefficients[i]:0;
result[i]=x[i];
if(scaling) {
@@ -311,8 +310,8 @@ unsigned GradientProjection::solve(
result[i]+=step;
//printf(" after unconstrained step: x[%d]=%f\n",i,result[i]);
stepSize+=step*step;
- COLA_ASSERT(!isNaN(result[i]));
- COLA_ASSERT(isFinite(result[i]));
+ COLA_ASSERT(!std::isnan(result[i]));
+ COLA_ASSERT(std::isfinite(result[i]));
if(!vars[i]->fixedDesiredPosition) vars[i]->desiredPosition=result[i];
}
@@ -451,7 +450,7 @@ void GradientProjection::destroyVPSC(IncSolver *vpsc) {
delete vars[i];
}
vars.resize(numStaticVars);
- sparseQ=NULL;
+ sparseQ=nullptr;
}
for(vector<Constraint*>::iterator i=lcs.begin();i!=lcs.end();i++) {
delete *i;
diff --git a/src/3rdparty/adaptagrams/libcola/gradient_projection.h b/src/3rdparty/adaptagrams/libcola/gradient_projection.h
index 522748b38..0e8578068 100644
--- a/src/3rdparty/adaptagrams/libcola/gradient_projection.h
+++ b/src/3rdparty/adaptagrams/libcola/gradient_projection.h
@@ -65,8 +65,8 @@ public:
CompoundConstraints const *ccs,
UnsatisfiableConstraintInfos *unsatisfiableConstraints,
NonOverlapConstraintsMode nonOverlapConstraints = None,
- RootCluster* clusterHierarchy = NULL,
- vpsc::Rectangles* rs = NULL,
+ RootCluster* clusterHierarchy = nullptr,
+ vpsc::Rectangles* rs = nullptr,
const bool scaling = false,
SolveWithMosek solveWithMosek = Off);
static void dumpSquareMatrix(std::valarray<double> const &L) {
diff --git a/src/3rdparty/adaptagrams/libcola/output_svg.cpp b/src/3rdparty/adaptagrams/libcola/output_svg.cpp
index 4176a5beb..cd564e6aa 100644
--- a/src/3rdparty/adaptagrams/libcola/output_svg.cpp
+++ b/src/3rdparty/adaptagrams/libcola/output_svg.cpp
@@ -41,7 +41,7 @@ using std::list;
void OutputFile::generate() {
unsigned E=es.size();
bool cleanupRoutes=false;
- if(routes==NULL) {
+ if(routes==nullptr) {
cleanupRoutes=true;
routes = new vector<straightener::Route*>(E);
for(unsigned i=0;i<E;i++) {
diff --git a/src/3rdparty/adaptagrams/libcola/output_svg.h b/src/3rdparty/adaptagrams/libcola/output_svg.h
index ae4b1cc69..d68f161e5 100644
--- a/src/3rdparty/adaptagrams/libcola/output_svg.h
+++ b/src/3rdparty/adaptagrams/libcola/output_svg.h
@@ -46,7 +46,7 @@ public:
const bool curvedEdges=false)
: rs(rs),
es(es),
- routes(NULL),
+ routes(nullptr),
rc(rc),
fname(fname),
rects(rects),
diff --git a/src/3rdparty/adaptagrams/libcola/shapepair.h b/src/3rdparty/adaptagrams/libcola/shapepair.h
index 18b160bc4..7c122cb3f 100644
--- a/src/3rdparty/adaptagrams/libcola/shapepair.h
+++ b/src/3rdparty/adaptagrams/libcola/shapepair.h
@@ -34,6 +34,8 @@ class ShapePair
public:
ShapePair(unsigned ind1, unsigned ind2);
bool operator<(const ShapePair& rhs) const;
+ unsigned short index1(void) const {return m_index1;}
+ unsigned short index2(void) const {return m_index2;}
private:
unsigned short m_index1;
diff --git a/src/3rdparty/adaptagrams/libcola/shortest_paths.h b/src/3rdparty/adaptagrams/libcola/shortest_paths.h
index 233624a3e..22b54e398 100644
--- a/src/3rdparty/adaptagrams/libcola/shortest_paths.h
+++ b/src/3rdparty/adaptagrams/libcola/shortest_paths.h
@@ -190,7 +190,7 @@ void dijkstra(
for(unsigned i=0;i<n;i++) {
vs[i].id=i;
vs[i].d=std::numeric_limits<T>::max();
- vs[i].p=NULL;
+ vs[i].p=nullptr;
}
vs[s].d=0;
PairingHeap<Node<T>*,CompareNodes<T> > Q;
diff --git a/src/3rdparty/adaptagrams/libcola/straightener.cpp b/src/3rdparty/adaptagrams/libcola/straightener.cpp
index 8ad30a5ff..dc22d1821 100644
--- a/src/3rdparty/adaptagrams/libcola/straightener.cpp
+++ b/src/3rdparty/adaptagrams/libcola/straightener.cpp
@@ -254,8 +254,8 @@ namespace straightener {
Node *v;
Edge *e;
double pos;
- Event(EventType t, Node *v, double p) : type(t),v(v),e(NULL),pos(p) {};
- Event(EventType t, Edge *e, double p) : type(t),v(NULL),e(e),pos(p) {};
+ Event(EventType t, Node *v, double p) : type(t),v(v),e(nullptr),pos(p) {};
+ Event(EventType t, Edge *e, double p) : type(t),v(nullptr),e(e),pos(p) {};
};
/*
* the following relation defines a strict weak ordering over events, i.e.:
@@ -302,7 +302,7 @@ namespace straightener {
const double conjpos, vector<Edge*> const & openEdges,
vector<Node *>& L,vector<Node *>& nodes) {
double minpos=-DBL_MAX, maxpos=DBL_MAX;
- if(l!=NULL) {
+ if(l!=nullptr) {
L.push_back(l);
minpos=l->scanpos;
}
@@ -329,7 +329,7 @@ namespace straightener {
// need to record start and end positions of edge segment!
Edge* e=i->second;
if(e->startNode==v->id||e->endNode==v->id) continue;
- //if(l!=NULL&&(e->startNode==l->id||e->endNode==l->id)) continue;
+ //if(l!=nullptr&&(e->startNode==l->id||e->endNode==l->id)) continue;
//cerr << "edge("<<e->startNode<<","<<e->endNode<<",pts="<<e->pts<<")"<<endl;
// here, we probably want to search for existing dummy
// nodes associated with the same edge within some
@@ -343,7 +343,7 @@ namespace straightener {
}
L.push_back(v);
- if(r!=NULL) {
+ if(r!=nullptr) {
maxpos=r->scanpos;
}
for(set<PosEdgePair>::iterator i=sortedEdges.begin();i!=sortedEdges.end();i++) {
@@ -354,7 +354,7 @@ namespace straightener {
// need to record start and end positions of edge segment!
Edge* e=i->second;
if(e->startNode==v->id||e->endNode==v->id) continue;
- //if(r!=NULL&&(e->startNode==r->id||e->endNode==r->id)) continue;
+ //if(r!=nullptr&&(e->startNode==r->id||e->endNode==r->id)) continue;
//cerr << "edge("<<e->startNode<<","<<e->endNode<<",pts="<<e->pts<<")"<<endl;
Node* d=dim==vpsc::HORIZONTAL?
new Node(nodes.size(),pos,conjpos,e):
@@ -362,7 +362,7 @@ namespace straightener {
L.push_back(d);
nodes.push_back(d);
}
- if(r!=NULL) {
+ if(r!=nullptr) {
L.push_back(r);
}
}
@@ -441,12 +441,12 @@ namespace straightener {
for(unsigned i=0;i<events.size();i++) {
Event *e=events[i];
Node *v=e->v;
- if(v!=NULL) {
+ if(v!=nullptr) {
v->open = true;
#ifdef STRAIGHTENER_DEBUG
printf("NEvent@%f,nid=%d,(%f,%f),w=%f,h=%f,openn=%d,opene=%d\n",e->pos,v->id,v->pos[0],v->pos[1],v->length[0],v->length[1],(int)openNodes.size(),(int)openEdges.size());
#endif
- Node *l=NULL, *r=NULL;
+ Node *l=nullptr, *r=nullptr;
if(!openNodes.empty()) {
// it points to the first node to the right of v
NodeSet::iterator it=openNodes.lower_bound(v);
@@ -493,7 +493,7 @@ namespace straightener {
// node is on an edge
Edge *edge=w->edge;
if(w->pos[dim]<v->pos[dim]) { // w left of v
- if(l!=NULL&&!edge->isEnd(l->id)) {
+ if(l!=nullptr&&!edge->isEnd(l->id)) {
cs.push_back(createConstraint(l,w,dim));
}
if(!edge->isEnd(v->id)) {
@@ -503,19 +503,19 @@ namespace straightener {
if(!edge->isEnd(v->id)) {
cs.push_back(createConstraint(v,w,dim));
}
- if(r!=NULL&&!edge->isEnd(r->id)) {
+ if(r!=nullptr&&!edge->isEnd(r->id)) {
cs.push_back(createConstraint(w,r,dim));
}
}
}
}
if(e->type==Close) {
- if(l!=NULL) cs.push_back(createConstraint(l,v,dim));
- if(r!=NULL) cs.push_back(createConstraint(v,r,dim));
+ if(l!=nullptr) cs.push_back(createConstraint(l,v,dim));
+ if(r!=nullptr) cs.push_back(createConstraint(v,r,dim));
}
}
if(e->type==Open) {
- if(v!=NULL) {
+ if(v!=nullptr) {
openNodes.insert(v);
} else {
#ifdef STRAIGHTENER_DEBUG
@@ -526,7 +526,7 @@ namespace straightener {
}
} else {
// Close
- if(v!=NULL) {
+ if(v!=nullptr) {
openNodes.erase(v);
v->open=false;
} else {
diff --git a/src/3rdparty/adaptagrams/libcola/straightener.h b/src/3rdparty/adaptagrams/libcola/straightener.h
index 7112efcad..846f4f95e 100644
--- a/src/3rdparty/adaptagrams/libcola/straightener.h
+++ b/src/3rdparty/adaptagrams/libcola/straightener.h
@@ -255,8 +255,8 @@ public:
bool open; // a node is opened (if scan is true) when the scanline first reaches
// its boundary and closed when the scanline leaves it.
Node(unsigned id, vpsc::Rectangle const * r) :
- ScanObject(id),cluster(NULL),
- edge(NULL),dummy(false),scan(true),active(true),open(false) {
+ ScanObject(id),cluster(nullptr),
+ edge(nullptr),dummy(false),scan(true),active(true),open(false) {
for(unsigned i=0;i<2;i++) {
pos[i]=r->getCentreD(i);
min[i]=r->getMinD(i);
@@ -265,8 +265,8 @@ public:
}
}
Node(unsigned id, const double x, const double y) :
- ScanObject(id),cluster(NULL),
- edge(NULL),dummy(false),scan(false),active(true),open(false) {
+ ScanObject(id),cluster(nullptr),
+ edge(nullptr),dummy(false),scan(false),active(true),open(false) {
pos[vpsc::HORIZONTAL]=x;
pos[vpsc::VERTICAL]=y;
for(unsigned i=0;i<2;i++) {
@@ -286,7 +286,7 @@ private:
const double conjpos, std::vector<Edge*> const & openEdges,
std::vector<Node *>& L, std::vector<Node *>& nodes);
Node(const unsigned id, const double x, const double y, Edge* e) :
- ScanObject(id),cluster(NULL),
+ ScanObject(id),cluster(nullptr),
edge(e),dummy(true),scan(false),active(false) {
pos[vpsc::HORIZONTAL]=x;
pos[vpsc::VERTICAL]=y;
@@ -304,10 +304,10 @@ struct CmpNodePos {
double vpos = v->scanpos;
bool tiebreaker = u < v;
if (u->cluster != v->cluster) {
- if(u->cluster!=NULL) {
+ if(u->cluster!=nullptr) {
upos = u->cluster->scanpos;
}
- if(v->cluster!=NULL) {
+ if(v->cluster!=nullptr) {
vpos = v->cluster->scanpos;
}
tiebreaker = u->cluster < v->cluster;
diff --git a/src/3rdparty/adaptagrams/libcola/tests/FixedRelativeConstraint01.cpp b/src/3rdparty/adaptagrams/libcola/tests/FixedRelativeConstraint01.cpp
index 50c34842e..378219e1d 100755
--- a/src/3rdparty/adaptagrams/libcola/tests/FixedRelativeConstraint01.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/FixedRelativeConstraint01.cpp
@@ -6,7 +6,7 @@ int main(void) {
std::vector<Edge> es;
double defaultEdgeLength=40;
std::vector<vpsc::Rectangle*> rs;
- vpsc::Rectangle *rect = NULL;
+ vpsc::Rectangle *rect = nullptr;
std::vector<unsigned> fixedShapes;
double textW = 100;
diff --git a/src/3rdparty/adaptagrams/libcola/tests/StillOverlap01.cpp b/src/3rdparty/adaptagrams/libcola/tests/StillOverlap01.cpp
index d277627c2..1b87767ba 100755
--- a/src/3rdparty/adaptagrams/libcola/tests/StillOverlap01.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/StillOverlap01.cpp
@@ -6,7 +6,7 @@ int main(void) {
std::vector<Edge> es;
double defaultEdgeLength=40;
std::vector<vpsc::Rectangle*> rs;
- vpsc::Rectangle *rect = NULL;
+ vpsc::Rectangle *rect = nullptr;
rect = new vpsc::Rectangle(210, 240, 83.5, 113.5);
rs.push_back(rect);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/StillOverlap02.cpp b/src/3rdparty/adaptagrams/libcola/tests/StillOverlap02.cpp
index 47b9958b0..c45eef6d5 100755
--- a/src/3rdparty/adaptagrams/libcola/tests/StillOverlap02.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/StillOverlap02.cpp
@@ -6,7 +6,7 @@ int main(void) {
std::vector<Edge> es;
double defaultEdgeLength=40;
std::vector<vpsc::Rectangle*> rs;
- vpsc::Rectangle *rect = NULL;
+ vpsc::Rectangle *rect = nullptr;
rect = new vpsc::Rectangle(80.8448, 110.845, -23.9565, 6.04346);
rs.push_back(rect);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/boundary.cpp b/src/3rdparty/adaptagrams/libcola/tests/boundary.cpp
index 18522e1cf..18e962d59 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/boundary.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/boundary.cpp
@@ -102,7 +102,7 @@ void clusterBoundary() {
SetDesiredPos preIteration(locks);
Test test(0.00001,100,vs,tes,"boundary");
- cola::ConstrainedFDLayout alg(rs,es,idealLength,NULL,test,&preIteration);
+ cola::ConstrainedFDLayout alg(rs,es,idealLength,nullptr,test,&preIteration);
alg.setTopology(&vs,&tes);
alg.run(true,true);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/constrained.cpp b/src/3rdparty/adaptagrams/libcola/tests/constrained.cpp
index 550601131..20215f719 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/constrained.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/constrained.cpp
@@ -81,14 +81,14 @@ int main() {
rs[i]->moveCentre(x,y);
}
// apply scaled majorization layout
- ConstrainedMajorizationLayout alg(rs,es,NULL,width/2);
+ ConstrainedMajorizationLayout alg(rs,es,nullptr,width/2);
alg.setConstraints(&ccs);
alg.setScaling(true);
alg.run();
// the following pair of nodes should line-up
assert(fabs(rs[0]->getCentreX()-rs[3]->getCentreX())<0.001);
cout<<rs[0]->getCentreX()<<","<<rs[3]->getCentreX()<<endl;
- OutputFile output(rs,es,NULL,"constrained.svg");
+ OutputFile output(rs,es,nullptr,"constrained.svg");
output.rects=true;
output.generate();
diff --git a/src/3rdparty/adaptagrams/libcola/tests/containment.cpp b/src/3rdparty/adaptagrams/libcola/tests/containment.cpp
index 0783b45cf..488700edf 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/containment.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/containment.cpp
@@ -68,7 +68,7 @@ int main() {
const unsigned c[]={0,4}, d[]={1,2,3};
unsigned nc=sizeof(c)/sizeof(unsigned), nd=sizeof(d)/sizeof(unsigned);
CheckProgress test(0.0001,100);
- ConstrainedMajorizationLayout alg(rs,es,&root,30,NULL,test);
+ ConstrainedMajorizationLayout alg(rs,es,&root,30,nullptr,test);
alg.setScaling(true);
rc.nodes.resize(nc);
copy(c,c+nc,rc.nodes.begin());
diff --git a/src/3rdparty/adaptagrams/libcola/tests/containment2.cpp b/src/3rdparty/adaptagrams/libcola/tests/containment2.cpp
index d411431b2..d499ffc6a 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/containment2.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/containment2.cpp
@@ -142,7 +142,7 @@ int main() {
OutputFile of(rs,es,&root,"containment2.svg",true,true);
//of.setLabels(V,labels);
CheckProgress test(0.0001,100);
- ConstrainedMajorizationLayout alg(rs,es,&root,30,NULL,test);
+ ConstrainedMajorizationLayout alg(rs,es,&root,30,nullptr,test);
alg.setScaling(false);
//alg.setYSeparationConstraints(&scy);
//alg.run();
diff --git a/src/3rdparty/adaptagrams/libcola/tests/convex_hull.cpp b/src/3rdparty/adaptagrams/libcola/tests/convex_hull.cpp
index 23ebbfb4a..38b662904 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/convex_hull.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/convex_hull.cpp
@@ -51,7 +51,7 @@ typedef vector<unsigned> Hull;
void randTest(unsigned n, valarray<double>& X, valarray<double>& Y) {
X.resize(n);
Y.resize(n);
- srand(time(NULL));
+ srand(time(nullptr));
for(unsigned i=0;i<n;i++) {
X[i]=getRand(1.);
Y[i]=getRand(1.);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/cycle_detector.cpp b/src/3rdparty/adaptagrams/libcola/tests/cycle_detector.cpp
index 4f4fefb7e..3b9a0a46f 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/cycle_detector.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/cycle_detector.cpp
@@ -39,7 +39,7 @@ int main() {
CycleDetector *cd;
Edges case_a, case_b, case_c, case_d, case_e, case_f, case_g;
- CyclicEdges *cycles = NULL;
+ CyclicEdges *cycles = nullptr;
vector<Rectangle *> rs;
unsigned V;
@@ -57,7 +57,7 @@ int main() {
cd = new CycleDetector(V, &case_a);
cycles = cd->detect_cycles();
- if (cycles != NULL) {
+ if (cycles != nullptr) {
cout << "cycles->size(): " << cycles->size() << endl;
for (unsigned i = 0; i < case_a.size(); i++) {
// print out the cycles
@@ -100,7 +100,7 @@ int main() {
cd->mod_graph(V, &case_b);
cycles = cd->detect_cycles();
- if (cycles != NULL) {
+ if (cycles != nullptr) {
cout << "cycles->size(): " << cycles->size() << endl;
for (unsigned i = 0; i < case_b.size(); i++) {
// print out the cycles
@@ -153,7 +153,7 @@ int main() {
//cd = new CycleDetector(V, &case_c);
cd->mod_graph(V, &case_c);
cycles = cd->detect_cycles();
- if (cycles != NULL) {
+ if (cycles != nullptr) {
cout << "cycles->size(): " << cycles->size() << endl;
for (unsigned i = 0; i < case_c.size(); i++) {
// print out the cycles
@@ -200,7 +200,7 @@ int main() {
cd->mod_graph(V, &case_d);
cycles = cd->detect_cycles();
- if (cycles != NULL) {
+ if (cycles != nullptr) {
cout << "cycles->size(): " << cycles->size() << endl;
for (unsigned i = 0; i < case_d.size(); i++) {
// print out the cycles
@@ -253,7 +253,7 @@ int main() {
// detect the cycles
cd->mod_graph(V, &case_e);
cycles = cd->detect_cycles();
- if (cycles != NULL) {
+ if (cycles != nullptr) {
cout << "cycles->size(): " << cycles->size() << endl;
for (unsigned i = 0; i < case_e.size(); i++) {
// print out the cycles
@@ -298,7 +298,7 @@ int main() {
cd->mod_graph(V, &case_f);
cycles = cd->detect_cycles();
- if (cycles != NULL) {
+ if (cycles != nullptr) {
// output a picture
rs.push_back(new Rectangle(10,10+5,10,10+5));
rs.push_back(new Rectangle(40,40+5,30,30+5));
@@ -325,7 +325,7 @@ int main() {
a.cyclicAncestor = &a;
Node *ca = cd->get_highest_ca(&f);
- if (ca != NULL) { cout << "Highest cyclic ancestor found at vertex(" << ca->id << ")" << endl; }
+ if (ca != nullptr) { cout << "Highest cyclic ancestor found at vertex(" << ca->id << ")" << endl; }
// create case G
// case G hows the ability to find nested cycles and to reassign cyclic ancestors
@@ -349,7 +349,7 @@ int main() {
cd->mod_graph(V, &case_g);
cycles = cd->detect_cycles();
- if (cycles != NULL) {
+ if (cycles != nullptr) {
cout << "cycles->size(): " << cycles->size() << endl;
for (unsigned i = 0; i < case_g.size(); i++) {
// print out the cycles
diff --git a/src/3rdparty/adaptagrams/libcola/tests/gml_graph.cpp b/src/3rdparty/adaptagrams/libcola/tests/gml_graph.cpp
index 03ad8cca4..6a280cfa7 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/gml_graph.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/gml_graph.cpp
@@ -208,7 +208,7 @@ int main() {
double height=1000;
vector<vpsc::Rectangle*> rs;
cout << "|V|=" << V << endl;
- //srand(time(NULL));
+ //srand(time(nullptr));
for(unsigned i=0;i<V;i++) {
double x=getRand(width), y=getRand(height);
rs.push_back(new vpsc::Rectangle(x,x+1,y,y+1));
@@ -221,8 +221,8 @@ int main() {
bs.push_back(80);
bs.push_back(120);
PostIteration test(rs,ps,bs,0.0001,200);
- ConstrainedMajorizationLayout alg(rs,es,NULL,defaultEdgeLength,NULL,test);
- //ConstrainedFDLayout alg(rs,es,NULL,defaultEdgeLength,NULL,test);
+ ConstrainedMajorizationLayout alg(rs,es,nullptr,defaultEdgeLength,nullptr,test);
+ //ConstrainedFDLayout alg(rs,es,nullptr,defaultEdgeLength,nullptr,test);
//alg.setConstrainedLayout(true);
//alg.setScaling(true);
//alg.setXConstraints(&cx);
@@ -246,7 +246,7 @@ int main() {
colours[*i]=ColourRGBA(0,0,0,1.);
}
*/
- OutputFile of(rs,es,NULL,"gml_graph-constrained.svg",false,true);
+ OutputFile of(rs,es,nullptr,"gml_graph-constrained.svg",false,true);
//of.colours=&colours;
of.generate();
for(unsigned i=0;i<V;i++) {
diff --git a/src/3rdparty/adaptagrams/libcola/tests/graphlayouttest.h b/src/3rdparty/adaptagrams/libcola/tests/graphlayouttest.h
index 58715bab6..2cc51e72c 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/graphlayouttest.h
+++ b/src/3rdparty/adaptagrams/libcola/tests/graphlayouttest.h
@@ -130,14 +130,14 @@ void run_test(
vector<vpsc::Rectangle*> rs;
unsigned V=startpos.size();
cout << "|V|=" << V << endl;
- //srand(time(NULL));
+ //srand(time(nullptr));
for(unsigned i=0;i<V;i++) {
double x=startpos[i].first, y=startpos[i].second;
rs.push_back(new vpsc::Rectangle(x,x+1,y,y+1));
}
CheckProgress test(0.001,100);
clock_t starttime=clock();
- ConstrainedMajorizationLayout alg(rs,es,NULL,defaultEdgeLength,
+ ConstrainedMajorizationLayout alg(rs,es,nullptr,defaultEdgeLength,
StandardEdgeLengths,&test);
switch(s) {
cout << "Solver: ";
@@ -174,7 +174,7 @@ void run_test(
ss << fname << "_" << V << "_" << testdesc << ".svg";
cout<<ss.str()<<" Time="<<t<<endl;
- OutputFile of(rs,es,NULL,ss.str().c_str(),false,true);
+ OutputFile of(rs,es,nullptr,ss.str().c_str(),false,true);
of.generate();
for(unsigned i=0;i<V;i++) {
delete rs[i];
@@ -204,7 +204,7 @@ void writeFile(const topology::Nodes& vs, const topology::Edges& es, const strin
for(topology::Nodes::const_iterator i=vs.begin();i!=vs.end();++i) {
rs.push_back((*i)->rect);
}
- OutputFile of(rs,cedges,NULL,outputFileName,true,false);
+ OutputFile of(rs,cedges,nullptr,outputFileName,true,false);
of.setLabels(labels);
of.routes=&routes;
of.generate();
@@ -214,7 +214,7 @@ void writeFile(const topology::Nodes& vs, const topology::Edges& es, const strin
void writeDunnartFile(const topology::Nodes& vs, const vector<std::pair<unsigned int, unsigned int> >& es, const string& outputFileName) {
FILE *fp = fopen(outputFileName.c_str(), "w");
- assert (fp != NULL);
+ assert (fp != nullptr);
fprintf(fp, "<svg xmlns:dunnart=\"http://www.csse.monash.edu.au/~mwybrow/dunnart.dtd\">\n");
for(unsigned int i = 0; i < vs.size(); ++i) {
@@ -263,7 +263,7 @@ void writeDunnartFile(const topology::Nodes& vs, const vector<std::pair<unsigned
for(topology::Nodes::const_iterator i=vs.begin();i!=vs.end();++i) {
rs.push_back((*i)->rect);
}
- OutputFile of(rs,cedges,NULL,outputFileName,true,false);
+ OutputFile of(rs,cedges,nullptr,outputFileName,true,false);
of.setLabels(labels);
of.routes=&routes;
of.generate();
diff --git a/src/3rdparty/adaptagrams/libcola/tests/initialOverlap.cpp b/src/3rdparty/adaptagrams/libcola/tests/initialOverlap.cpp
index ba871990f..4f0a8bf6f 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/initialOverlap.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/initialOverlap.cpp
@@ -13,7 +13,7 @@ int main(void) {
EdgeLengths eLengths;
double defaultEdgeLength=1;
std::vector<vpsc::Rectangle*> rs;
- vpsc::Rectangle *rect = NULL;
+ vpsc::Rectangle *rect = nullptr;
rect = new vpsc::Rectangle(0, 100, 0, 60);
rs.push_back(rect);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/large_graph.cpp b/src/3rdparty/adaptagrams/libcola/tests/large_graph.cpp
index 712bd692c..a23699158 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/large_graph.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/large_graph.cpp
@@ -104,7 +104,7 @@ int main() {
double width=1000;
double height=1000;
vector<pair<double,double> > startpos(V);
- //srand(time(NULL));
+ //srand(time(nullptr));
for(unsigned i=0;i<V;i++) {
double x=getRand(width), y=getRand(height);
startpos[i]=make_pair(x,y);
@@ -124,17 +124,17 @@ int main() {
}
cout<<"Initial crossings="<<countCrossings(rs,es)<<endl;
CheckProgress test(0.0001,200);
- ConstrainedMajorizationLayout alg(rs,es,NULL,defaultEdgeLength,NULL,test);
+ ConstrainedMajorizationLayout alg(rs,es,nullptr,defaultEdgeLength,nullptr,test);
alg.setYConstraints(&cy);
alg.run();
cout<<"Majorization crossings="<<countCrossings(rs,es)<<endl;
- OutputFile output1(rs,es,NULL,"large_graph-majorization.pdf");
+ OutputFile output1(rs,es,nullptr,"large_graph-majorization.pdf");
output1.generate();
- ConstrainedFDLayout alg2(rs,es,defaultEdgeLength,NULL,test);
+ ConstrainedFDLayout alg2(rs,es,defaultEdgeLength,nullptr,test);
alg2.setYConstraints(&cy);
alg2.run();
cout<<"PStress crossings="<<countCrossings(rs,es)<<endl;
- OutputFile output(rs,es,NULL,"large_graph.pdf");
+ OutputFile output(rs,es,nullptr,"large_graph.pdf");
output.generate();
for(unsigned i=0;i<V;i++) {
delete rs[i];
diff --git a/src/3rdparty/adaptagrams/libcola/tests/makefeasible.cpp b/src/3rdparty/adaptagrams/libcola/tests/makefeasible.cpp
index a67936de8..4bfb082a1 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/makefeasible.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/makefeasible.cpp
@@ -1,7 +1,7 @@
/*
* vim: ts=4 sw=4 et tw=0 wm=0
*
- * libcola - A library providing force-directed network layout using the
+ * libcola - A library providing force-directed network layout using the
* stress-majorization method subject to separation constraints.
*
* Copyright (C) 2006-2008 Monash University
@@ -17,8 +17,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library in the file LICENSE; if not,
- * write to the Free Software Foundation, Inc., 59 Temple Place,
+ * License along with this library in the file LICENSE; if not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place,
* Suite 330, Boston, MA 02111-1307 USA
*
*/
@@ -29,6 +29,8 @@
#include <time.h>
#include <valarray>
#include <fstream>
+#include <sstream>
+
#include <libavoid/libavoid.h>
#include <libavoid/router.h>
@@ -75,7 +77,7 @@ static const unsigned BRANCHFACTOR = 4;
static const double EXTRAEDGEPROB = 0.002;
*/
-void makeEdge(unsigned u, unsigned v,
+void makeEdge(unsigned u, unsigned v,
vector<Edge> &edges, CompoundConstraints &ccs) {
edges.push_back(make_pair(u,v));
ccs.push_back(new SeparationConstraint(vpsc::YDIM, u,v,5));
@@ -183,7 +185,7 @@ void removeoverlaps(vpsc::Rectangles &rs, bool bothaxes) {
Rectangle::setYBorder(yBorder);
}
/*
-void writeTextFile(vector<cola::Edge>& edges) {
+void writeTextFile(vector<cola::Edge>& edges) {
ofstream outfile("new.txt",ofstream::binary);
for(vector<cola::Edge>::iterator e=edges.begin();e!=edges.end();++e) {
outfile<<"node"<<e->first<<",node"<<e->second<<endl;
@@ -245,7 +247,7 @@ void makeFeasible(vpsc::Rectangles& rs, vector<cola::Edge>& edges,
router->processTransaction();
const Avoid::Polygon& route = connRef->route();
vector<topology::EdgePoint*> eps;
- eps.push_back( new topology::EdgePoint( topologyNodes[e.first],
+ eps.push_back( new topology::EdgePoint( topologyNodes[e.first],
topology::EdgePoint::CENTRE));
for(size_t j=1;j+1<route.size();j++) {
const Avoid::Point& p = route.ps[j];
@@ -253,13 +255,13 @@ void makeFeasible(vpsc::Rectangles& rs, vector<cola::Edge>& edges,
topology::Node* node=topologyNodes[nodeID];
topology::EdgePoint::RectIntersect ri;
switch(p.vn) {
- case 0: ri=topology::EdgePoint::BR;
+ case 0: ri=topology::EdgePoint::BR;
break;
- case 1: ri=topology::EdgePoint::TR;
+ case 1: ri=topology::EdgePoint::TR;
break;
case 2: ri=topology::EdgePoint::TL;
break;
- case 3: ri=topology::EdgePoint::BL;
+ case 3: ri=topology::EdgePoint::BL;
break;
default: ri=topology::EdgePoint::CENTRE;
}
@@ -282,7 +284,7 @@ int main() {
unsigned V;
CompoundConstraints ccs;
- int seed = time(NULL);
+ int seed = time(nullptr);
//seed=1207906420;
//seed=1207920674;
//seed=1207982613;
@@ -324,12 +326,12 @@ int main() {
clock_t unconstrainedstarttime=clock();
//writeTextFile(es);
es.clear();
- ConstrainedFDLayout alg2(rs,es,defaultEdgeLength,NULL,test);
+ ConstrainedFDLayout alg2(rs,es,defaultEdgeLength,nullptr,test);
//alg2.setConstraints(&ccs);
alg2.makeFeasible(true);
alg2.run();
-
+
alg2.outputInstanceToSVG();
#if 0
double totaltime=0;
@@ -345,10 +347,10 @@ int main() {
test.reset();
alg2.setTopology(&topologyNodes, &routes);
writeFile(topologyNodes,routes,"beautify1.svg");
- char dunnartfile[50];
- sprintf(dunnartfile, "v%de%d.svg", V, (int) es.size());
- writeDunnartFile(topologyNodes,es,dunnartfile);
-
+ std::stringstream dunnartfile;
+ dunnartfile << "v" << V << "e" << (int) es.size() << ".svg";
+ writeDunnartFile(topologyNodes,es,dunnartfile.str().c_str());
+
alg2.run();
double beautifytime=double(clock()-beautifystarttime)/double(CLOCKS_PER_SEC);
totaltime+=beautifytime;
diff --git a/src/3rdparty/adaptagrams/libcola/tests/makefeasible02.cpp b/src/3rdparty/adaptagrams/libcola/tests/makefeasible02.cpp
index 2c4da9a1f..82d55b77a 100755
--- a/src/3rdparty/adaptagrams/libcola/tests/makefeasible02.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/makefeasible02.cpp
@@ -6,7 +6,7 @@ int main(void) {
std::vector<Edge> es;
double defaultEdgeLength=40;
std::vector<vpsc::Rectangle*> rs;
- vpsc::Rectangle *rect = NULL;
+ vpsc::Rectangle *rect = nullptr;
rect = new vpsc::Rectangle(252, 272, 930, 950);
rs.push_back(rect);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/max_acyclic_subgraph.cpp b/src/3rdparty/adaptagrams/libcola/tests/max_acyclic_subgraph.cpp
index 9e9b1d44e..cb2eb3806 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/max_acyclic_subgraph.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/max_acyclic_subgraph.cpp
@@ -37,7 +37,7 @@ using vpsc::Rectangle;
int main() {
MaxAcyclicSubgraph *mas;
Edges case_a, case_b, case_c, case_d, case_e, case_f;
- Edges *subgraph = NULL;
+ Edges *subgraph = nullptr;
vector<Rectangle *> rs;
unsigned V;
@@ -56,7 +56,7 @@ int main() {
mas = new MaxAcyclicSubgraph(V, &case_a);
subgraph = mas->find_subgraph();
- if (subgraph != NULL) {
+ if (subgraph != nullptr) {
cout << "subgraph->size(): " << subgraph->size() << endl;
cout << "Ea: ";
for (unsigned i = 0; i < subgraph->size(); i++) {
@@ -101,7 +101,7 @@ int main() {
mas->mod_graph(V, &case_b);
subgraph = mas->find_subgraph();
- if (subgraph != NULL) {
+ if (subgraph != nullptr) {
cout << "subgraph->size(): " << subgraph->size() << endl;
cout << "Ea: ";
for (unsigned i = 0; i < subgraph->size(); i++) {
@@ -159,7 +159,7 @@ int main() {
mas->mod_graph(V, &case_c);
subgraph = mas->find_subgraph();
- if (subgraph != NULL) {
+ if (subgraph != nullptr) {
cout << "subgraph->size(): " << subgraph->size() << endl;
cout << "Ea: ";
for (unsigned i = 0; i < subgraph->size(); i++) {
@@ -210,7 +210,7 @@ int main() {
mas->mod_graph(V, &case_d);
subgraph = mas->find_subgraph();
- if (subgraph != NULL) {
+ if (subgraph != nullptr) {
cout << "subgraph->size(): " << subgraph->size() << endl;
cout << "Ea: ";
for (unsigned i = 0; i < subgraph->size(); i++) {
@@ -264,7 +264,7 @@ int main() {
// detect the subgraph
mas->mod_graph(V, &case_e);
subgraph = mas->find_subgraph();
- if (subgraph != NULL) {
+ if (subgraph != nullptr) {
cout << "subgraph->size(): " << subgraph->size() << endl;
cout << "Ea: ";
for (unsigned i = 0; i < subgraph->size(); i++) {
@@ -313,7 +313,7 @@ int main() {
mas->mod_graph(V, &case_f);
subgraph = mas->find_subgraph();
- if (subgraph != NULL) {
+ if (subgraph != nullptr) {
cout << "subgraph->size(): " << subgraph->size() << endl;
cout << "Ea: ";
for (unsigned i = 0; i < subgraph->size(); i++) {
diff --git a/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters01.cpp b/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters01.cpp
index 7a00be676..6031c71cc 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters01.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters01.cpp
@@ -10,7 +10,7 @@ int main(void) {
EdgeLengths eLengths;
double defaultEdgeLength=50;
std::vector<vpsc::Rectangle*> rs;
- vpsc::Rectangle *rect = NULL;
+ vpsc::Rectangle *rect = nullptr;
rect = new vpsc::Rectangle(245.517, 247.517, 279.574, 281.574);
rs.push_back(rect);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters02.cpp b/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters02.cpp
index d721e9409..a6bdaf2de 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters02.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters02.cpp
@@ -23,7 +23,7 @@ int main(void) {
EdgeLengths eLengths;
double defaultEdgeLength=10;
std::vector<vpsc::Rectangle*> rs;
- vpsc::Rectangle *rect = NULL;
+ vpsc::Rectangle *rect = nullptr;
double width = 5;
double height = 5;
diff --git a/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters04.cpp b/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters04.cpp
index 36a85bd19..45a06ff12 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters04.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/overlappingClusters04.cpp
@@ -11,7 +11,7 @@ int main(void) {
EdgeLengths eLengths;
double defaultEdgeLength=10;
std::vector<vpsc::Rectangle*> rs;
- vpsc::Rectangle *rect = NULL;
+ vpsc::Rectangle *rect = nullptr;
rect = new vpsc::Rectangle(0, 5, 0, 5);
rs.push_back(rect);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/page_bounds.cpp b/src/3rdparty/adaptagrams/libcola/tests/page_bounds.cpp
index 212036477..b753cbf20 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/page_bounds.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/page_bounds.cpp
@@ -69,7 +69,7 @@ int main() {
cout << "V="<<V<<endl;
double width=1000;
double height=1000;
- //srand(time(NULL));
+ //srand(time(nullptr));
vector<pair<double,double> > startpos(V);
for(unsigned i=0;i<V;i++) {
double x=getRand(width), y=getRand(height);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/planar.cpp b/src/3rdparty/adaptagrams/libcola/tests/planar.cpp
index 19deb8718..f5eae9c8c 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/planar.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/planar.cpp
@@ -100,7 +100,7 @@ void writeFile(const topology::Nodes& vs, const topology::Edges& es, const char
for(topology::Nodes::const_iterator i=vs.begin();i!=vs.end();++i) {
rs.push_back((*i)->rect);
}
- OutputFile of(rs,cedges,NULL,outputFileName,true,false);
+ OutputFile of(rs,cedges,nullptr,outputFileName,true,false);
of.setLabels(labels);
of.routes=&routes;
of.generate();
@@ -272,7 +272,7 @@ t.addToPath(3,(topology::EdgePoint::RectIntersect)4);
t.addEdge(70.000000);
writeFile(t.vs,t.tes,"planar-000.svg");
Test test(0.00001,100,t.vs,t.tes);
- ConstrainedFDLayout alg(t.rs,t.es,70.0,NULL,test,NULL);
+ ConstrainedFDLayout alg(t.rs,t.es,70.0,nullptr,test,nullptr);
alg.setTopology(&t.vs,&t.tes);
alg.run(true,true);
double finalStress=alg.computeStress();
diff --git a/src/3rdparty/adaptagrams/libcola/tests/random_graph.cpp b/src/3rdparty/adaptagrams/libcola/tests/random_graph.cpp
index 215e704cc..68e2ee151 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/random_graph.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/random_graph.cpp
@@ -61,7 +61,7 @@ int main() {
cout << "V="<<V<<endl;
double width=1000;
double height=1000;
- //srand(time(NULL));
+ //srand(time(nullptr));
vector<pair<double,double> > startpos(V);
for(unsigned i=0;i<V;i++) {
double x=getRand(width), y=getRand(height);
@@ -95,7 +95,7 @@ int main() {
rs.push_back(new vpsc::Rectangle(x,x+5,y,y+5));
}
CheckProgress test(0.0001,200);
- ConstrainedMajorizationLayout alg(rs,es,NULL,defaultEdgeLength,
+ ConstrainedMajorizationLayout alg(rs,es,nullptr,defaultEdgeLength,
StandardEdgeLengths,&test);
//alg.setYConstraints(&cy);
alg.run();
@@ -103,7 +103,7 @@ int main() {
StandardEdgeLengths, &test);
//alg2.setYConstraints(&cy);
alg2.run();
- OutputFile output(rs,es,NULL,"random.pdf");
+ OutputFile output(rs,es,nullptr,"random.pdf");
output.generate();
for(unsigned i=0;i<V;i++) {
delete rs[i];
diff --git a/src/3rdparty/adaptagrams/libcola/tests/rectangularClusters01.cpp b/src/3rdparty/adaptagrams/libcola/tests/rectangularClusters01.cpp
index 087617abf..4269b3b56 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/rectangularClusters01.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/rectangularClusters01.cpp
@@ -8,7 +8,7 @@ int main(void) {
EdgeLengths eLengths;
double defaultEdgeLength=1;
std::vector<vpsc::Rectangle*> rs;
- vpsc::Rectangle *rect = NULL;
+ vpsc::Rectangle *rect = nullptr;
rect = new vpsc::Rectangle(56.4457, 117.446, 954.77, 1043.77);
rs.push_back(rect);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/rectclustershapecontainment.cpp b/src/3rdparty/adaptagrams/libcola/tests/rectclustershapecontainment.cpp
index 013c6343a..3c3d704a1 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/rectclustershapecontainment.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/rectclustershapecontainment.cpp
@@ -6,7 +6,7 @@ int main(void) {
std::vector<Edge> es;
double defaultEdgeLength=40;
std::vector<vpsc::Rectangle*> rs;
- vpsc::Rectangle *rect = NULL;
+ vpsc::Rectangle *rect = nullptr;
rect = new vpsc::Rectangle(478, 488, 399, 409);
rs.push_back(rect);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/resize.cpp b/src/3rdparty/adaptagrams/libcola/tests/resize.cpp
index cf43bfac8..97c2e9dd1 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/resize.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/resize.cpp
@@ -111,7 +111,7 @@ void resize() {
r->width()+60,r->height()+60));
PreIteration preIteration(resize);
Test test(0.00001,100,vs,tes);
- ConstrainedFDLayout alg(rs,es,idealLength,NULL,test,&preIteration);
+ ConstrainedFDLayout alg(rs,es,idealLength,nullptr,test,&preIteration);
alg.setTopology(&vs,&tes);
alg.run(true,true);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/small_graph.cpp b/src/3rdparty/adaptagrams/libcola/tests/small_graph.cpp
index 116eb5ecf..53103c906 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/small_graph.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/small_graph.cpp
@@ -81,14 +81,14 @@ int main() {
double width=1000;
double height=1000;
vector<vpsc::Rectangle*> rs;
- //srand(time(NULL));
+ //srand(time(nullptr));
for(unsigned i=0;i<V;i++) {
double x=getRand(width), y=getRand(height);
rs.push_back(new vpsc::Rectangle(x,x+1,y,y+1));
}
CheckProgress test(0.001,100);
clock_t starttime=clock();
- ConstrainedMajorizationLayout alg(rs,es,NULL,defaultEdgeLength,NULL,test);
+ ConstrainedMajorizationLayout alg(rs,es,nullptr,defaultEdgeLength,nullptr,test);
bool constrained=false;
if(!constrained) {
cout << "Unconstrained layout" << endl;
@@ -102,7 +102,7 @@ int main() {
}
double t=double(clock()-starttime)/double(CLOCKS_PER_SEC);
cout<<"Time="<<t<<endl;
- output_svg(rs,es,NULL,"small_graph.svg",true);
+ output_svg(rs,es,nullptr,"small_graph.svg",true);
for(unsigned i=0;i<V;i++) {
delete rs[i];
}
diff --git a/src/3rdparty/adaptagrams/libcola/tests/topology.cpp b/src/3rdparty/adaptagrams/libcola/tests/topology.cpp
index c9ac63730..4c94ef7c8 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/topology.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/topology.cpp
@@ -89,7 +89,7 @@ void writeFile(const topology::Nodes& vs, const topology::Edges& es, const char
for(topology::Nodes::const_iterator i=vs.begin();i!=vs.end();++i) {
rs.push_back((*i)->rect);
}
- OutputFile of(rs,cedges,NULL,outputFileName,true,false);
+ OutputFile of(rs,cedges,nullptr,outputFileName,true,false);
of.setLabels(labels);
of.routes=&routes;
of.generate();
@@ -155,7 +155,7 @@ void randomMove(int i) {
printf(" Lock: %f,%f\n",lx,ly);
SetDesiredPos preIteration(locks);
Test test(0.00001,100,vs,tes);
- ConstrainedFDLayout alg(rs,es,idealLength,NULL,test,&preIteration);
+ ConstrainedFDLayout alg(rs,es,idealLength,nullptr,test,&preIteration);
alg.setTopology(&vs,&tes);
alg.run(true,true);
diff --git a/src/3rdparty/adaptagrams/libcola/tests/trees.cpp b/src/3rdparty/adaptagrams/libcola/tests/trees.cpp
index 7824af867..72fb29638 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/trees.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/trees.cpp
@@ -77,7 +77,7 @@ vector<Edge> random_tree(unsigned depth, unsigned maxbranch, unsigned &V,
int main() {
unsigned V;
CompoundConstraints cx,cy;
- //srand(time(NULL));
+ //srand(time(nullptr));
srand(3);
vector<Edge> es = random_tree(7,4,V,cx,cy);
double defaultEdgeLength=40;
diff --git a/src/3rdparty/adaptagrams/libcola/tests/unconstrained.cpp b/src/3rdparty/adaptagrams/libcola/tests/unconstrained.cpp
index df614ae68..f6f112bd5 100644
--- a/src/3rdparty/adaptagrams/libcola/tests/unconstrained.cpp
+++ b/src/3rdparty/adaptagrams/libcola/tests/unconstrained.cpp
@@ -58,11 +58,11 @@ int main() {
rs.push_back(new vpsc::Rectangle(x,x+5,y,y+5));
}
CheckProgress test(1e-9,100);
- ConstrainedFDLayout alg(rs,es,width/2,NULL,&test);
+ ConstrainedFDLayout alg(rs,es,width/2,nullptr,&test);
alg.run();
double stress = alg.computeStress();
assert(stress < 0.0013);
- OutputFile output(rs,es,NULL,"unconstrained.svg");
+ OutputFile output(rs,es,nullptr,"unconstrained.svg");
output.generate();
for(unsigned i=0;i<V;i++) {
delete rs[i];
diff --git a/src/3rdparty/adaptagrams/libvpsc/CMakeLists.txt b/src/3rdparty/adaptagrams/libvpsc/CMakeLists.txt
index fabf64740..538ad30e1 100644
--- a/src/3rdparty/adaptagrams/libvpsc/CMakeLists.txt
+++ b/src/3rdparty/adaptagrams/libvpsc/CMakeLists.txt
@@ -17,7 +17,6 @@ set(libvpsc_SRC
cbuffer.h
constraint.h
exceptions.h
- isnan.h
linesegment.h
pairing_heap.h
rectangle.h
diff --git a/src/3rdparty/adaptagrams/libvpsc/README b/src/3rdparty/adaptagrams/libvpsc/README
deleted file mode 100644
index 03d43be29..000000000
--- a/src/3rdparty/adaptagrams/libvpsc/README
+++ /dev/null
@@ -1 +0,0 @@
-libcola, libavoid, and libvpsc are used for connector routing.
diff --git a/src/3rdparty/adaptagrams/libvpsc/assertions.h b/src/3rdparty/adaptagrams/libvpsc/assertions.h
index 68eab8f11..f19706902 100644
--- a/src/3rdparty/adaptagrams/libvpsc/assertions.h
+++ b/src/3rdparty/adaptagrams/libvpsc/assertions.h
@@ -66,7 +66,7 @@ class CriticalFailure
{
public:
CriticalFailure(const char *expr, const char *file, int line,
- const char *function = NULL)
+ const char *function = nullptr)
: expr(expr),
file(file),
line(line),
diff --git a/src/3rdparty/adaptagrams/libvpsc/block.cpp b/src/3rdparty/adaptagrams/libvpsc/block.cpp
index a5e7ed0d1..dfcf6c949 100644
--- a/src/3rdparty/adaptagrams/libvpsc/block.cpp
+++ b/src/3rdparty/adaptagrams/libvpsc/block.cpp
@@ -84,11 +84,11 @@ Block::Block(Blocks *blocks, Variable* const v)
//, wposn(0)
, deleted(false)
, timeStamp(0)
- , in(NULL)
- , out(NULL)
+ , in(nullptr)
+ , out(nullptr)
, blocks(blocks)
{
- if(v!=NULL) {
+ if(v!=nullptr) {
v->offset=0;
addVariable(v);
}
@@ -213,7 +213,7 @@ void Block::mergeOut(Block *b) {
out->merge(b->out);
}
Constraint *Block::findMinInConstraint() {
- Constraint *v = NULL;
+ Constraint *v = nullptr;
std::vector<Constraint*> outOfDate;
while (!in->isEmpty()) {
v = in->findMin();
@@ -255,18 +255,18 @@ Constraint *Block::findMinInConstraint() {
in->insert(v);
}
if(in->isEmpty()) {
- v=NULL;
+ v=nullptr;
} else {
v=in->findMin();
}
return v;
}
Constraint *Block::findMinOutConstraint() {
- if(out->isEmpty()) return NULL;
+ if(out->isEmpty()) return nullptr;
Constraint *v = out->findMin();
while (v->left->block == v->right->block) {
out->deleteMin();
- if(out->isEmpty()) return NULL;
+ if(out->isEmpty()) return nullptr;
v = out->findMin();
}
return v;
@@ -302,7 +302,7 @@ double Block::compute_dfdv(Variable* const v, Variable* const u,
if(canFollowRight(c,u)) {
c->lm=compute_dfdv(c->right,v,min_lm);
dfdv+=c->lm*c->left->scale;
- if(!c->equality&&(min_lm==NULL||c->lm<min_lm->lm)) min_lm=c;
+ if(!c->equality&&(min_lm==nullptr||c->lm<min_lm->lm)) min_lm=c;
}
}
for(Cit it=v->in.begin();it!=v->in.end();++it) {
@@ -310,7 +310,7 @@ double Block::compute_dfdv(Variable* const v, Variable* const u,
if(canFollowLeft(c,u)) {
c->lm=-compute_dfdv(c->left,v,min_lm);
dfdv-=c->lm*c->right->scale;
- if(!c->equality&&(min_lm==NULL||c->lm<min_lm->lm)) min_lm=c;
+ if(!c->equality&&(min_lm==nullptr||c->lm<min_lm->lm)) min_lm=c;
}
}
return dfdv/v->scale;
@@ -336,9 +336,9 @@ double Block::compute_dfdv(Variable* const v, Variable* const u) {
// The top level v and r are variables between which we want to find the
// constraint with the smallest lm.
-// Similarly, m is initially NULL and is only assigned a value if the next
+// Similarly, m is initially nullptr and is only assigned a value if the next
// variable to be visited is r or if a possible min constraint is returned from
-// a nested call (rather than NULL).
+// a nested call (rather than nullptr).
// Then, the search for the m with minimum lm occurs as we return from
// the recursion (checking only constraints traversed left-to-right
// in order to avoid creating any new violations).
@@ -397,7 +397,7 @@ Block::Pair Block::compute_dfdv_between(
Variable* r, Variable* const v, Variable* const u,
const Direction dir = NONE, bool changedDirection = false) {
double dfdv=v->weight*(v->position() - v->desiredPosition);
- Constraint *m=NULL;
+ Constraint *m=nullptr;
for(Cit it(v->in.begin());it!=v->in.end();++it) {
Constraint *c=*it;
if(canFollowLeft(c,u)) {
@@ -405,7 +405,7 @@ Block::Pair Block::compute_dfdv_between(
changedDirection = true;
}
if(c->left==r) {
- r=NULL;
+ r=nullptr;
if(!c->equality) m=c;
}
Pair p=compute_dfdv_between(r,c->left,v,
@@ -422,7 +422,7 @@ Block::Pair Block::compute_dfdv_between(
changedDirection = true;
}
if(c->right==r) {
- r=NULL;
+ r=nullptr;
if(!c->equality) m=c;
}
Pair p=compute_dfdv_between(r,c->right,v,
@@ -484,35 +484,35 @@ void Block::list_active(Variable* const v, Variable* const u) {
* that most wants to split
*/
Constraint *Block::findMinLM() {
- Constraint *min_lm=NULL;
- reset_active_lm(vars->front(),NULL);
- compute_dfdv(vars->front(),NULL,min_lm);
+ Constraint *min_lm=nullptr;
+ reset_active_lm(vars->front(),nullptr);
+ compute_dfdv(vars->front(),nullptr,min_lm);
#ifdef LIBVPSC_LOGGING
ofstream f(LOGFILE,ios::app);
f<<" langrangians: "<<endl;
- list_active(vars->front(),NULL);
+ list_active(vars->front(),nullptr);
#endif
return min_lm;
}
Constraint *Block::findMinLMBetween(Variable* const lv, Variable* const rv) {
- reset_active_lm(vars->front(),NULL);
- compute_dfdv(vars->front(),NULL);
- Constraint *min_lm=NULL;
- split_path(rv,lv,NULL,min_lm);
+ reset_active_lm(vars->front(),nullptr);
+ compute_dfdv(vars->front(),nullptr);
+ Constraint *min_lm=nullptr;
+ split_path(rv,lv,nullptr,min_lm);
#if 0
- if(min_lm==NULL) {
- split_path(rv,lv,NULL,min_lm,true);
+ if(min_lm==nullptr) {
+ split_path(rv,lv,nullptr,min_lm,true);
}
#else
- if(min_lm==NULL) {
+ if(min_lm==nullptr) {
#ifdef LIBVPSC_DEBUG
fprintf(stderr,"Couldn't find split point!\n");
#endif
UnsatisfiableException e;
- getActivePathBetween(e.path,lv,rv,NULL);
+ getActivePathBetween(e.path,lv,rv,nullptr);
throw e;
}
- COLA_ASSERT(min_lm!=NULL);
+ COLA_ASSERT(min_lm!=nullptr);
#endif
return min_lm;
}
@@ -560,7 +560,7 @@ bool Block::getActivePathBetween(Constraints& path, Variable const* u,
bool Block::isActiveDirectedPathBetween(Variable const* u, Variable const* v) const {
if(u==v) return true;
for (Cit_const c=u->out.begin();c!=u->out.end();++c) {
- if(canFollowRight(*c,NULL)) {
+ if(canFollowRight(*c,nullptr)) {
if(isActiveDirectedPathBetween((*c)->right,v)) {
return true;
}
@@ -572,7 +572,7 @@ bool Block::getActiveDirectedPathBetween(
Constraints& path, Variable const* u, Variable const* v) const {
if(u==v) return true;
for (Cit_const c=u->out.begin();c!=u->out.end();++c) {
- if(canFollowRight(*c,NULL)) {
+ if(canFollowRight(*c,nullptr)) {
if(getActiveDirectedPathBetween(path,(*c)->right,v)) {
path.push_back(*c);
return true;
@@ -597,7 +597,7 @@ Constraint* Block::splitBetween(Variable* const vl, Variable* const vr,
#ifdef LIBVPSC_LOGGING
f<<" going to split on: "<<*c<<endl;
#endif
- if(c!=NULL) {
+ if(c!=nullptr) {
split(lb,rb,c);
deleted = true;
}
diff --git a/src/3rdparty/adaptagrams/libvpsc/block.h b/src/3rdparty/adaptagrams/libvpsc/block.h
index 21a3737b7..448ead02b 100644
--- a/src/3rdparty/adaptagrams/libvpsc/block.h
+++ b/src/3rdparty/adaptagrams/libvpsc/block.h
@@ -63,7 +63,7 @@ public:
//double weight;
//double wposn;
PositionStats ps;
- Block(Blocks *blocks, Variable* const v=NULL);
+ Block(Blocks *blocks, Variable* const v=nullptr);
~Block(void);
Constraint* findMinLM();
Constraint* findMinLMBetween(Variable* const lv, Variable* const rv);
diff --git a/src/3rdparty/adaptagrams/libvpsc/blocks.cpp b/src/3rdparty/adaptagrams/libvpsc/blocks.cpp
index 52e940ce7..7481084e5 100644
--- a/src/3rdparty/adaptagrams/libvpsc/blocks.cpp
+++ b/src/3rdparty/adaptagrams/libvpsc/blocks.cpp
@@ -112,13 +112,13 @@ void Blocks::mergeLeft(Block *r) {
r->timeStamp=++blockTimeCtr;
r->setUpInConstraints();
Constraint *c=r->findMinInConstraint();
- while (c != NULL && c->slack()<0) {
+ while (c != nullptr && c->slack()<0) {
#ifdef LIBVPSC_LOGGING
f<<"mergeLeft on constraint: "<<*c<<endl;
#endif
r->deleteMinInConstraint();
Block *l = c->left->block;
- if (l->in==NULL) l->setUpInConstraints();
+ if (l->in==nullptr) l->setUpInConstraints();
double dist = c->right->offset - c->left->offset - c->gap;
if (r->vars->size() < l->vars->size()) {
dist=-dist;
@@ -145,7 +145,7 @@ void Blocks::mergeRight(Block *l) {
#endif
l->setUpOutConstraints();
Constraint *c = l->findMinOutConstraint();
- while (c != NULL && c->slack()<0) {
+ while (c != nullptr && c->slack()<0) {
#ifdef LIBVPSC_LOGGING
f<<"mergeRight on constraint: "<<*c<<endl;
#endif
diff --git a/src/3rdparty/adaptagrams/libvpsc/cbuffer.cpp b/src/3rdparty/adaptagrams/libvpsc/cbuffer.cpp
index 676bad304..942892259 100644
--- a/src/3rdparty/adaptagrams/libvpsc/cbuffer.cpp
+++ b/src/3rdparty/adaptagrams/libvpsc/cbuffer.cpp
@@ -64,7 +64,7 @@ namespace vpsc {
}
}
Constraint* CBuffer::mostViolated() {
- Constraint* v=NULL;
+ Constraint* v=nullptr;
while(true) {
if(size==0) {
load();
diff --git a/src/3rdparty/adaptagrams/libvpsc/constraint.cpp b/src/3rdparty/adaptagrams/libvpsc/constraint.cpp
index f1b7f0571..96581c760 100644
--- a/src/3rdparty/adaptagrams/libvpsc/constraint.cpp
+++ b/src/3rdparty/adaptagrams/libvpsc/constraint.cpp
@@ -41,7 +41,7 @@ Constraint::Constraint(Variable *left, Variable *right, double gap, bool equalit
equality(equality),
unsatisfiable(false),
needsScaling(true),
- creator(NULL)
+ creator(nullptr)
{
// In hindsight I think it's probably better to build the constraint DAG
// (by creating variable in/out lists) when needed, rather than in advance
diff --git a/src/3rdparty/adaptagrams/libvpsc/doc/description.doc b/src/3rdparty/adaptagrams/libvpsc/doc/description.doc
index 46a21b093..ee66b3581 100644
--- a/src/3rdparty/adaptagrams/libvpsc/doc/description.doc
+++ b/src/3rdparty/adaptagrams/libvpsc/doc/description.doc
@@ -14,16 +14,16 @@ libvpsc is part of the
<a href="http://www.adaptagrams.org/">Adaptagrams project</a>.
There are no official releases yet, though the code is stable and
available from the Adaptagrams
-<a href="https://github.com/mjwybrow/adaptagrams">github
+<a href="https://github.com/mjwybrow/adaptagrams">GitHub
repository</a>.
The API is documented using Doxygen. The documentation you are currently
reading can be obtained by running doxygen in the cola directory.
libcola is written and maintained by
-<a href="http://marvl.infotech.monash.edu/~mwybrow/">Michael Wybrow</a> and
-<a href="http://marvl.infotech.monash.edu/~dwyer/">Tim Dwyer</a>,
-members of <a href="http://marvl.infotech.monash.edu/">MArVL: the Monash Adaptive Visualisation Lab</a> at Monash University, Australia.
+<a href="http://users.monash.edu/~mwybrow/">Michael Wybrow</a> and
+<a href="http://ialab.it.monash.edu/~dwyer/">Tim Dwyer</a>,
+members of <a href="http://ialab.it.monash.edu/">Immersive Analytics Lab</a> at Monash University, Australia.
The algorithms used for VPSC are described in the following papers. If you use libcola, please cite the relevant paper.
- Tim Dwyer, Kim Marriott, and Peter J. Stuckey. Fast node overlap removal.\n
diff --git a/src/3rdparty/adaptagrams/libvpsc/isnan.h b/src/3rdparty/adaptagrams/libvpsc/isnan.h
deleted file mode 100644
index 1e32b8a7a..000000000
--- a/src/3rdparty/adaptagrams/libvpsc/isnan.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * vim: ts=4 sw=4 et tw=0 wm=0
- *
- * libvpsc - A solver for the problem of Variable Placement with
- * Separation Constraints.
- *
- * Copyright (C) 2005-2008 Monash University
- *
- * 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) any later version.
- * See the file LICENSE.LGPL distributed with the library.
- *
- * 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.
- *
-*/
-
-#ifndef VPSC_ISNAN_H
-#define VPSC_ISNAN_H
-
-/*
- * Temporary fix for various misdefinitions of isnan().
- * isnan() is becoming undef'd in some .h files.
- * #include this last in your .cpp file to get it right.
- *
- * The problem is that isnan and isfinite are part of C99 but aren't part of
- * the C++ standard (which predates C99).
- *
- * Authors:
- * Inkscape groupies and obsessive-compulsives
- *
- * Copyright (C) 2004 authors
- *
- * Released under GNU LGPL, read the file 'LICENSE' for more information
- *
- * 2005 modification hereby placed in public domain. Probably supercedes
- * the 2004 copyright for the code itself.
- */
-
-#include <cmath>
-#include <cfloat>
-
-#if defined(__isnan)
-# define isNaN(_a) (__isnan(_a)) /* MacOSX/Darwin definition < 10.4 */
-#elif defined(WIN32) || defined(_isnan)
-# define isNaN(_a) (_isnan(_a)) /* Win32 definition */
-#elif defined(isnan) || defined(__FreeBSD__)
-# define isNaN(_a) (isnan(_a)) /* GNU definition */
-#else
-# define isNaN(_a) (std::isnan(_a))
-#endif
-/* If the above doesn't work, then try (a != a).
- * Also, please report a bug as per http://www.inkscape.org/report_bugs.php,
- * giving information about what platform and compiler version you're using.
- */
-
-
-#if defined(__isfinite)
-# define isFinite(_a) (__isfinite(_a)) /* MacOSX/Darwin definition < 10.4 */
-#elif defined(isfinite)
-# define isFinite(_a) (isfinite(_a))
-#else
-# define isFinite(_a) (std::isfinite(_a))
-#endif
-/* If the above doesn't work, then try (finite(_a) && !isNaN(_a)) or (!isNaN((_a) - (_a))).
- * Also, please report a bug as per http://www.inkscape.org/report_bugs.php,
- * giving information about what platform and compiler version you're using.
- */
-
-
-#endif /* VPSC_ISNAN_H */
diff --git a/src/3rdparty/adaptagrams/libvpsc/linesegment.h b/src/3rdparty/adaptagrams/libvpsc/linesegment.h
index ecf8800b0..caca3a2bb 100644
--- a/src/3rdparty/adaptagrams/libvpsc/linesegment.h
+++ b/src/3rdparty/adaptagrams/libvpsc/linesegment.h
@@ -103,21 +103,21 @@ void DoLineSegmentIntersection(const Vector& p0, const Vector& p1, const Vector&
Vector intersection;
std::cout << "Line Segment 0: (" << p0.x_ << ", " << p0.y_ << ") to (" << p1.x_ << ", " << p1.y_ << ")\n"
- << "Line Segment 1: (" << p2.x_ << ", " << p2.y_ << ") to (" << p3.x_ << ", " << p3.y_ << ")" << std::endl;
+ << "Line Segment 1: (" << p2.x_ << ", " << p2.y_ << ") to (" << p3.x_ << ", " << p3.y_ << ")\n";
switch(linesegment0.Intersect(linesegment1, intersection))
{
case LineSegment::PARALLEL:
- std::cout << "The lines are parallel\n" << std::endl;
+ std::cout << "The lines are parallel\n\n";
break;
case LineSegment::COINCIDENT:
- std::cout << "The lines are coincident\n" << std::endl;
+ std::cout << "The lines are coincident\n\n";
break;
case LineSegment::NOT_INTERSECTING:
- std::cout << "The lines do not intersect\n" << std::endl;
+ std::cout << "The lines do not intersect\n\n";
break;
case LineSegment::INTERSECTING:
- std::cout << "The lines intersect at (" << intersection.x_ << ", " << intersection.y_ << ")\n" << std::endl;
+ std::cout << "The lines intersect at (" << intersection.x_ << ", " << intersection.y_ << ")\n\n";
break;
}
}
diff --git a/src/3rdparty/adaptagrams/libvpsc/pairing_heap.h b/src/3rdparty/adaptagrams/libvpsc/pairing_heap.h
index 6e6457c07..479519aa0 100644
--- a/src/3rdparty/adaptagrams/libvpsc/pairing_heap.h
+++ b/src/3rdparty/adaptagrams/libvpsc/pairing_heap.h
@@ -67,7 +67,7 @@ struct PairNode
PairNode( const T & theElement ) :
element( theElement ),
- leftChild(NULL), nextSibling(NULL), prev(NULL)
+ leftChild(nullptr), nextSibling(nullptr), prev(nullptr)
{ }
};
@@ -84,14 +84,14 @@ class PairingHeap
friend std::ostream& operator<< <T,TCompare> (std::ostream &os, const PairingHeap<T,TCompare> &b);
#endif
public:
- PairingHeap() : root(NULL), counter(0), siblingsTreeArray(5) { }
+ PairingHeap() : root(nullptr), counter(0), siblingsTreeArray(5) { }
PairingHeap(const PairingHeap & rhs) {
// uses operator= to make deep copy
*this = rhs;
}
~PairingHeap() { makeEmpty(); }
const PairingHeap & operator=( const PairingHeap & rhs );
- bool isEmpty() const { return root == NULL; }
+ bool isEmpty() const { return root == nullptr; }
unsigned size() const { return counter; }
PairNode<T> *insert( const T & x );
const T & findMin( ) const;
@@ -103,7 +103,7 @@ public:
}
void makeEmpty() {
reclaimMemory(root);
- root = NULL;
+ root = nullptr;
counter = 0;
}
void decreaseKey( PairNode<T> *p, const T & newVal );
@@ -112,7 +112,7 @@ protected:
// Destructively gets the root for merging into another heap.
PairNode<T> * removeRootForMerge(unsigned& size) {
PairNode<T> *r=root;
- root=NULL;
+ root=nullptr;
size=counter;
counter=0;
return r;
@@ -143,7 +143,7 @@ PairingHeap<T,TCompare>::insert( const T & x )
{
PairNode<T> *newNode = new PairNode<T>( x );
- if( root == NULL )
+ if( root == nullptr )
root = newNode;
else
compareAndLink( root, newNode );
@@ -174,8 +174,8 @@ void PairingHeap<T,TCompare>::deleteMin( )
PairNode<T> *oldRoot = root;
- if( root->leftChild == NULL )
- root = NULL;
+ if( root->leftChild == nullptr )
+ root = nullptr;
else
root = combineSiblings( root->leftChild );
COLA_ASSERT(counter);
@@ -207,7 +207,7 @@ PairingHeap<T,TCompare>::operator=( const PairingHeap<T,TCompare> & rhs )
template <class T,class TCompare>
void PairingHeap<T,TCompare>::reclaimMemory( PairNode<T> * t ) const
{
- if( t != NULL )
+ if( t != nullptr )
{
reclaimMemory( t->leftChild );
reclaimMemory( t->nextSibling );
@@ -230,14 +230,14 @@ void PairingHeap<T,TCompare>::decreaseKey( PairNode<T> *p,
p->element = newVal;
if( p != root )
{
- if( p->nextSibling != NULL )
+ if( p->nextSibling != nullptr )
p->nextSibling->prev = p->prev;
if( p->prev->leftChild == p )
p->prev->leftChild = p->nextSibling;
else
p->prev->nextSibling = p->nextSibling;
- p->nextSibling = NULL;
+ p->nextSibling = nullptr;
compareAndLink( root, p );
}
}
@@ -250,7 +250,7 @@ void PairingHeap<T,TCompare>::merge( PairingHeap<T,TCompare> *rhs )
{
unsigned rhsSize;
PairNode<T> *broot=rhs->removeRootForMerge(rhsSize);
- if (root == NULL) {
+ if (root == nullptr) {
root = broot;
} else {
compareAndLink(root, broot);
@@ -261,9 +261,9 @@ void PairingHeap<T,TCompare>::merge( PairingHeap<T,TCompare> *rhs )
/**
* Internal method that is the basic operation to maintain order.
* Links first and second together to satisfy heap order.
-* first is root of tree 1, which may not be NULL.
-* first->nextSibling MUST be NULL on entry.
-* second is root of tree 2, which may be NULL.
+* first is root of tree 1, which may not be nullptr.
+* first->nextSibling MUST be nullptr on entry.
+* second is root of tree 2, which may be nullptr.
* first becomes the result of the tree merge.
*/
template <class T,class TCompare>
@@ -271,7 +271,7 @@ void PairingHeap<T,TCompare>::
compareAndLink( PairNode<T> * & first,
PairNode<T> *second ) const
{
- if( second == NULL )
+ if( second == nullptr )
return;
if( lessThan(second->element,first->element) )
@@ -280,7 +280,7 @@ compareAndLink( PairNode<T> * & first,
second->prev = first->prev;
first->prev = second;
first->nextSibling = second->leftChild;
- if( first->nextSibling != NULL )
+ if( first->nextSibling != nullptr )
first->nextSibling->prev = first;
second->leftChild = first;
first = second;
@@ -290,10 +290,10 @@ compareAndLink( PairNode<T> * & first,
// Attach second as leftmost child of first
second->prev = first;
first->nextSibling = second->nextSibling;
- if( first->nextSibling != NULL )
+ if( first->nextSibling != nullptr )
first->nextSibling->prev = first;
second->nextSibling = first->leftChild;
- if( second->nextSibling != NULL )
+ if( second->nextSibling != nullptr )
second->nextSibling->prev = second;
first->leftChild = second;
}
@@ -302,28 +302,28 @@ compareAndLink( PairNode<T> * & first,
/**
* Internal method that implements two-pass merging.
* firstSibling the root of the conglomerate;
-* assumed not NULL.
+* assumed not nullptr.
*/
template <class T,class TCompare>
PairNode<T> *
PairingHeap<T,TCompare>::combineSiblings( PairNode<T> *firstSibling )
{
- if( firstSibling->nextSibling == NULL )
+ if( firstSibling->nextSibling == nullptr )
return firstSibling;
// Store the subtrees in an array
int numSiblings = 0;
- for( ; firstSibling != NULL; numSiblings++ )
+ for( ; firstSibling != nullptr; numSiblings++ )
{
if( numSiblings == (int)siblingsTreeArray.size( ) )
siblingsTreeArray.resize( numSiblings * 2 );
siblingsTreeArray[ numSiblings ] = firstSibling;
- firstSibling->prev->nextSibling = NULL; // break links
+ firstSibling->prev->nextSibling = nullptr; // break links
firstSibling = firstSibling->nextSibling;
}
if( numSiblings == (int)siblingsTreeArray.size( ) )
siblingsTreeArray.resize( numSiblings + 1 );
- siblingsTreeArray[ numSiblings ] = NULL;
+ siblingsTreeArray[ numSiblings ] = nullptr;
// Combine subtrees two at a time, going left to right
int i = 0;
@@ -352,14 +352,14 @@ template <class T,class TCompare>
PairNode<T> *
PairingHeap<T,TCompare>::clone( PairNode<T> * t ) const
{
- if( t == NULL )
- return NULL;
+ if( t == nullptr )
+ return nullptr;
else
{
PairNode<T> *p = new PairNode<T>( t->element );
- if( ( p->leftChild = clone( t->leftChild ) ) != NULL )
+ if( ( p->leftChild = clone( t->leftChild ) ) != nullptr )
p->leftChild->prev = p;
- if( ( p->nextSibling = clone( t->nextSibling ) ) != NULL )
+ if( ( p->nextSibling = clone( t->nextSibling ) ) != nullptr )
p->nextSibling->prev = p;
return p;
}
@@ -369,17 +369,17 @@ template <class T,class TCompare>
std::ostream& operator <<(std::ostream &os, const PairingHeap<T,TCompare> &b)
{
os<<"Heap:";
- if (b.root != NULL) {
+ if (b.root != nullptr) {
PairNode<T> *r = b.root;
std::list<PairNode<T>*> q;
q.push_back(r);
while (!q.empty()) {
r = q.front();
q.pop_front();
- if (r->leftChild != NULL) {
+ if (r->leftChild != nullptr) {
os << *r->element << ">";
PairNode<T> *c = r->leftChild;
- while (c != NULL) {
+ while (c != nullptr) {
q.push_back(c);
os << "," << *c->element;
c = c->nextSibling;
diff --git a/src/3rdparty/adaptagrams/libvpsc/rectangle.cpp b/src/3rdparty/adaptagrams/libvpsc/rectangle.cpp
index f040f4427..6d80c348d 100644
--- a/src/3rdparty/adaptagrams/libvpsc/rectangle.cpp
+++ b/src/3rdparty/adaptagrams/libvpsc/rectangle.cpp
@@ -25,6 +25,7 @@
*
*/
+#include <cmath>
#include <set>
#include <cstdlib>
#include <algorithm>
@@ -36,8 +37,6 @@
#include "libvpsc/constraint.h"
#include "libvpsc/variable.h"
-#include "libvpsc/isnan.h" /* Include last */
-
using std::set;
using std::vector;
@@ -121,8 +120,8 @@ struct Node {
NodeSet *leftNeighbours, *rightNeighbours;
Node(Variable *v, Rectangle *r, double p)
: v(v),r(r),pos(p),
- firstAbove(NULL), firstBelow(NULL),
- leftNeighbours(NULL), rightNeighbours(NULL)
+ firstAbove(nullptr), firstBelow(nullptr),
+ leftNeighbours(nullptr), rightNeighbours(nullptr)
{
COLA_ASSERT(r->width()<1e40);
@@ -132,11 +131,11 @@ struct Node {
delete rightNeighbours;
}
void addLeftNeighbour(Node *u) {
- COLA_ASSERT(leftNeighbours!=NULL);
+ COLA_ASSERT(leftNeighbours!=nullptr);
leftNeighbours->insert(u);
}
void addRightNeighbour(Node *u) {
- COLA_ASSERT(rightNeighbours!=NULL);
+ COLA_ASSERT(rightNeighbours!=nullptr);
rightNeighbours->insert(u);
}
void setNeighbours(NodeSet *left, NodeSet *right) {
@@ -153,8 +152,8 @@ struct Node {
}
};
bool CmpNodePos::operator() (const Node* u, const Node* v) const {
- COLA_ASSERT(!isNaN(u->pos));
- COLA_ASSERT(!isNaN(v->pos));
+ COLA_ASSERT(!std::isnan(u->pos));
+ COLA_ASSERT(!std::isnan(v->pos));
if (u->pos < v->pos) {
return true;
}
@@ -214,9 +213,9 @@ int compare_events(const void *a, const void *b) {
return 1;
} else if(ea->pos < eb->pos) {
return -1;
- } else if(isNaN(ea->pos) != isNaN(ea->pos)) {
+ } else if(std::isnan(ea->pos) != std::isnan(ea->pos)) {
/* See comment in CmpNodePos. */
- return ( isNaN(ea->pos)
+ return ( std::isnan(ea->pos)
? -1
: 1 );
}
@@ -295,12 +294,12 @@ void generateXConstraints(const Rectangles& rs, const Variables& vars,
}
} else {
Node *l=v->firstAbove, *r=v->firstBelow;
- if(l!=NULL) {
+ if(l!=nullptr) {
double sep = (v->r->width()+l->r->width())/2.0;
cs.push_back(new Constraint(l->v,v->v,sep));
l->firstBelow=v->firstBelow;
}
- if(r!=NULL) {
+ if(r!=nullptr) {
double sep = (v->r->width()+r->r->width())/2.0;
cs.push_back(new Constraint(v->v,r->v,sep));
r->firstAbove=v->firstAbove;
@@ -364,12 +363,12 @@ void generateYConstraints(const Rectangles& rs, const Variables& vars,
} else {
// Close event
Node *l=v->firstAbove, *r=v->firstBelow;
- if(l!=NULL) {
+ if(l!=nullptr) {
double sep = (v->r->height()+l->r->height())/2.0;
cs.push_back(new Constraint(l->v,v->v,sep));
l->firstBelow=v->firstBelow;
}
- if(r!=NULL) {
+ if(r!=nullptr) {
double sep = (v->r->height()+r->r->height())/2.0;
cs.push_back(new Constraint(v->v,r->v,sep));
r->firstAbove=v->firstAbove;
@@ -561,7 +560,7 @@ void Rectangle::routeAround(double x1, double y1, double x2, double y2,
* @param rs the rectangles which will be moved to remove overlap
*/
void removeoverlaps(Rectangles& rs) {
- const set<unsigned> fixed;
+ const set<unsigned> fixed = set<unsigned>();
removeoverlaps(rs,fixed);
}
#define ISNOTNAN(d) (d)==(d)
diff --git a/src/3rdparty/adaptagrams/libvpsc/solve_VPSC.cpp b/src/3rdparty/adaptagrams/libvpsc/solve_VPSC.cpp
index aebd0b8d8..08cc1e4ab 100644
--- a/src/3rdparty/adaptagrams/libvpsc/solve_VPSC.cpp
+++ b/src/3rdparty/adaptagrams/libvpsc/solve_VPSC.cpp
@@ -174,13 +174,13 @@ void Solver::refine() {
{
Block *b = bs->at(i);
Constraint *c=b->findMinLM();
- if(c!=NULL && c->lm<LAGRANGIAN_TOLERANCE) {
+ if(c!=nullptr && c->lm<LAGRANGIAN_TOLERANCE) {
#ifdef LIBVPSC_LOGGING
ofstream f(LOGFILE,ios::app);
f<<"Split on constraint: "<<*c<<endl;
#endif
// Split on c
- Block *l=NULL, *r=NULL;
+ Block *l=nullptr, *r=nullptr;
bs->split(b,l,r,c);
bs->cleanup();
// split alters the block set so we have to restart
@@ -247,7 +247,7 @@ bool IncSolver::satisfy() {
#endif
splitBlocks();
//long splitCtr = 0;
- Constraint* v = NULL;
+ Constraint* v = nullptr;
//CBuffer buffer(inactive);
while ( (v = mostViolated(inactive)) &&
(v->equality || ((v->slack() < ZERO_UPPERBOUND) && !v->active)) )
@@ -273,7 +273,7 @@ bool IncSolver::satisfy() {
try {
Constraint* splitConstraint
=lb->splitBetween(v->left,v->right,lb,rb);
- if(splitConstraint!=NULL) {
+ if(splitConstraint!=nullptr) {
COLA_ASSERT(!splitConstraint->active);
inactive.push_back(splitConstraint);
} else {
@@ -361,13 +361,13 @@ void IncSolver::splitBlocks() {
{
Block *b = bs->at(i);
Constraint* v=b->findMinLM();
- if(v!=NULL && v->lm < LAGRANGIAN_TOLERANCE) {
+ if(v!=nullptr && v->lm < LAGRANGIAN_TOLERANCE) {
COLA_ASSERT(!v->equality);
#ifdef LIBVPSC_LOGGING
f<<" found split point: "<<*v<<" lm="<<v->lm<<endl;
#endif
splitCnt++;
- Block *b = v->left->block, *l=NULL, *r=NULL;
+ Block *b = v->left->block, *l=nullptr, *r=nullptr;
COLA_ASSERT(v->left->block == v->right->block);
//double pos = b->posn;
b->split(l,r,v);
@@ -400,14 +400,14 @@ void IncSolver::splitBlocks() {
Constraint* IncSolver::mostViolated(Constraints &l)
{
double slackForMostViolated = DBL_MAX;
- Constraint* mostViolated = NULL;
+ Constraint* mostViolated = nullptr;
#ifdef LIBVPSC_LOGGING
ofstream f(LOGFILE,ios::app);
f << "Looking for most violated..." << endl;
#endif
size_t lSize = l.size();
size_t deleteIndex = lSize;
- Constraint *constraint = NULL;
+ Constraint *constraint = nullptr;
double slack = 0;
for (size_t index = 0; index < lSize; ++index)
{
@@ -473,7 +473,7 @@ bool Solver::constraintGraphIsCyclic(const unsigned n, Variable* const vs[]) {
}
}
while(graph.size()>0) {
- node *u=NULL;
+ node *u=nullptr;
vector<node*>::iterator i=graph.begin();
for(;i!=graph.end();++i) {
u=*i;
@@ -516,7 +516,7 @@ bool Solver::blockGraphIsCyclic() {
Block *b = bs->at(i);
b->setUpInConstraints();
Constraint *c=b->findMinInConstraint();
- while(c!=NULL) {
+ while(c!=nullptr) {
Block *l=c->left->block;
bmap[b]->in.insert(bmap[l]);
b->deleteMinInConstraint();
@@ -525,7 +525,7 @@ bool Solver::blockGraphIsCyclic() {
b->setUpOutConstraints();
c=b->findMinOutConstraint();
- while(c!=NULL) {
+ while(c!=nullptr) {
Block *r=c->right->block;
bmap[b]->out.insert(bmap[r]);
b->deleteMinOutConstraint();
@@ -533,7 +533,7 @@ bool Solver::blockGraphIsCyclic() {
}
}
while(graph.size()>0) {
- node *u=NULL;
+ node *u=nullptr;
vector<node*>::iterator i=graph.begin();
for(;i!=graph.end();++i) {
u=*i;
diff --git a/src/3rdparty/adaptagrams/libvpsc/tests/rectangleoverlap.cpp b/src/3rdparty/adaptagrams/libvpsc/tests/rectangleoverlap.cpp
index d4fba2b1b..d8ad72eb0 100644
--- a/src/3rdparty/adaptagrams/libvpsc/tests/rectangleoverlap.cpp
+++ b/src/3rdparty/adaptagrams/libvpsc/tests/rectangleoverlap.cpp
@@ -640,7 +640,7 @@ int main() {
cout << "test12" << endl;
test(generateRects(test12,n12,rs),c,t);
int max_size=100, repeats=100,step=10;
- //srand(time(NULL));
+ //srand(time(nullptr));
for(int i=10;i<=max_size;i+=step) {
//if(i%5==0) cout << i << endl;
double disp=0, time=0;
diff --git a/src/3rdparty/adaptagrams/libvpsc/tests/satisfy_inc.cpp b/src/3rdparty/adaptagrams/libvpsc/tests/satisfy_inc.cpp
index 514b36e2f..60aeb09bf 100644
--- a/src/3rdparty/adaptagrams/libvpsc/tests/satisfy_inc.cpp
+++ b/src/3rdparty/adaptagrams/libvpsc/tests/satisfy_inc.cpp
@@ -44,7 +44,7 @@ inline bool approxEquals(const double a, const double b) {
}
typedef vector<Constraint*> CS;
-bool checkResult(unsigned n, Variable *a[], unsigned m, Constraint *c[], double expected[]=NULL) {
+bool checkResult(unsigned n, Variable *a[], unsigned m, Constraint *c[], double expected[]=nullptr) {
std::vector<Variable*> aa(a,a+n);
std::vector<Constraint*> cc(c,c+m);
IncSolver vpsc(aa,cc);
@@ -463,7 +463,7 @@ new Constraint(a[3],a[4],3)};
std::vector<Constraint*> cc(c,c+m);
IncSolver vpsc(aa,cc);
vpsc.solve();
- assert(checkResult(n,a,m,c,NULL));
+ assert(checkResult(n,a,m,c,nullptr));
cout << "Test 10... done." << endl;
}
void test11() {
@@ -493,7 +493,7 @@ new Constraint(a[3],a[4],3)};
std::vector<Constraint*> cc(c,c+m);
IncSolver vpsc(aa,cc);
vpsc.solve();
- assert(checkResult(n,a,m,c,NULL));
+ assert(checkResult(n,a,m,c,nullptr));
cout << "Test 11... done." << endl;
}
void test12() {
@@ -523,7 +523,7 @@ new Constraint(a[3],a[4],3)};
unsigned int n = sizeof(a)/sizeof(Variable*);
unsigned int m = sizeof(c)/sizeof(Constraint*);
//dumpMatlabProblem(n,a,m,c);
- assert(checkResult(n,a,m,c,NULL));
+ assert(checkResult(n,a,m,c,nullptr));
cout << "Test 12... done." << endl;
}
void test13() {
@@ -555,7 +555,7 @@ new Constraint(a[3],a[4],3)};
unsigned int n = sizeof(a)/sizeof(Variable*);
unsigned int m = sizeof(c)/sizeof(Constraint*);
//dumpMatlabProblem(n,a,m,c);
- assert(checkResult(n,a,m,c,NULL));
+ assert(checkResult(n,a,m,c,nullptr));
cout << "Test 13... done." << endl;
}
@@ -640,7 +640,7 @@ void rand_test(unsigned n, unsigned m) {
delete [] acs;
}
int main() {
- srand(time(NULL));
+ srand(time(nullptr));
test10();
test2();
test3();
diff --git a/src/3rdparty/adaptagrams/libvpsc/variable.h b/src/3rdparty/adaptagrams/libvpsc/variable.h
index d6114eee6..aaad7532a 100644
--- a/src/3rdparty/adaptagrams/libvpsc/variable.h
+++ b/src/3rdparty/adaptagrams/libvpsc/variable.h
@@ -69,7 +69,7 @@ public:
, weight(weight)
, scale(scale)
, offset(0)
- , block(NULL)
+ , block(nullptr)
, visited(false)
, fixedDesiredPosition(false)
{