[med-svn] [libbpp-seq] 01/05: New upstream version 2.3.2

Julien Dutheil jdutheil-guest at moszumanska.debian.org
Mon Feb 5 19:47:55 UTC 2018


This is an automated email from the git hooks/post-receive script.

jdutheil-guest pushed a commit to branch master
in repository libbpp-seq.

commit 0dc6a7ed726ee743d7e1964c669209b93f1946d6
Author: Julien Y. Dutheil <dutheil at evolbio.mpg.de>
Date:   Mon Feb 5 17:34:25 2018 +0100

    New upstream version 2.3.2
---
 Doxyfile                                           | 477 +++++--------
 src/Bpp/Seq/Alphabet/AlphabetTools.cpp             |   1 +
 src/Bpp/Seq/Alphabet/AlphabetTools.h               |   5 +-
 src/Bpp/Seq/Alphabet/CodonAlphabet.cpp             | 163 +++--
 src/Bpp/Seq/Alphabet/CodonAlphabet.h               | 577 +++++++++++-----
 src/Bpp/Seq/Alphabet/WordAlphabet.cpp              |  14 +-
 src/Bpp/Seq/Alphabet/WordAlphabet.h                | 738 ++++++++++++---------
 src/Bpp/Seq/CodonSiteTools.cpp                     |  13 +-
 src/Bpp/Seq/CodonSiteTools.h                       |   2 +-
 .../Container/VectorProbabilisticSiteContainer.cpp | 187 ------
 .../Container/VectorProbabilisticSiteContainer.h   | 123 ----
 src/Bpp/Seq/SequenceTools.cpp                      |  22 +-
 src/Bpp/Seq/StringSequenceTools.cpp                |   8 +-
 src/Bpp/Seq/SymbolListTools.cpp                    |   4 +-
 test/CMakeLists.txt                                |   2 +
 test/test_alphabets.cpp                            |   9 +
 16 files changed, 1222 insertions(+), 1123 deletions(-)

diff --git a/Doxyfile b/Doxyfile
index 75faa98..b496a3c 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -1,4 +1,4 @@
-# Doxyfile 1.8.11
+# Doxyfile 1.8.7
 
 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for a project.
@@ -44,23 +44,23 @@ PROJECT_NUMBER         = 2.3.0
 # 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          = 
+PROJECT_BRIEF          =
 
-# 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.
+# 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.
 
-PROJECT_LOGO           = 
+PROJECT_LOGO           =
 
 # 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       = 
+OUTPUT_DIRECTORY       =
 
-# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# 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
@@ -93,14 +93,14 @@ ALLOW_UNICODE_NAMES    = NO
 
 OUTPUT_LANGUAGE        = English
 
-# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# 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, doxygen will prepend the brief
+# 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
@@ -118,7 +118,7 @@ REPEAT_BRIEF           = YES
 # the entity):The $name class, The $name widget, The $name file, is, provides,
 # specifies, contains, represents, a, an and the.
 
-ABBREVIATE_BRIEF       = 
+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
@@ -135,7 +135,7 @@ ALWAYS_DETAILED_SEC    = NO
 
 INLINE_INHERITED_MEMB  = YES
 
-# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# 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.
@@ -205,9 +205,9 @@ MULTILINE_CPP_IS_BRIEF = NO
 
 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
@@ -228,13 +228,13 @@ TAB_SIZE               = 2
 # "Side Effects:". You can put \n's in the value part of an alias to insert
 # newlines.
 
-ALIASES                = 
+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.
 
-TCL_SUBST              = 
+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
@@ -276,12 +276,12 @@ OPTIMIZE_OUTPUT_VHDL   = NO
 # 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 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      = 
+EXTENSION_MAPPING      =
 
 # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
 # according to the Markdown format, which allows for more readable
@@ -295,8 +295,8 @@ 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 putting a % sign in front of the word or
-# globally by setting AUTOLINK_SUPPORT to NO.
+# be prevented in individual cases by 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
@@ -336,20 +336,13 @@ SIP_SUPPORT            = NO
 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
 
-# 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
@@ -408,7 +401,7 @@ LOOKUP_CACHE_SIZE      = 0
 # Build related configuration options
 #---------------------------------------------------------------------------
 
-# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# 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.
@@ -418,35 +411,35 @@ LOOKUP_CACHE_SIZE      = 0
 
 EXTRACT_ALL            = YES
 
-# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# 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        = YES
 
-# 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
+# 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         = YES
 
-# 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,
+# 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  = YES
 
-# This flag is only useful for Objective-C code. If set to YES, local methods,
+# 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, only methods in the interface are
+# included in the documentation. If set to NO only methods in the interface are
 # included.
 # The default value is: NO.
 
@@ -471,21 +464,21 @@ HIDE_UNDOC_MEMBERS     = NO
 
 # 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.
+# 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     = NO
 
 # 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
+# (class|struct|union) declarations. If set to NO these declarations will be
 # included in the documentation.
 # The default value is: NO.
 
 HIDE_FRIEND_COMPOUNDS  = NO
 
 # 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
+# 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.
 
@@ -499,7 +492,7 @@ HIDE_IN_BODY_DOCS      = 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
+# 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.
@@ -508,19 +501,12 @@ INTERNAL_DOCS          = NO
 CASE_SENSE_NAMES       = YES
 
 # 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
+# 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 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.
@@ -548,14 +534,14 @@ INLINE_INFO            = YES
 
 # 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.
+# 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
 # descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO, the members will appear in declaration order. Note that
+# 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.
 
@@ -600,25 +586,27 @@ SORT_BY_SCOPE_NAME     = 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      = NO
 
-# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# 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       = NO
 
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# 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.
@@ -629,7 +617,7 @@ GENERATE_DEPRECATEDLIST= YES
 # sections, marked by \if <section_label> ... \endif and \cond <section_label>
 # ... \endcond blocks.
 
-ENABLED_SECTIONS       = 
+ENABLED_SECTIONS       =
 
 # 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
@@ -643,8 +631,8 @@ ENABLED_SECTIONS       =
 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
-# list will mention the files that were used to generate the documentation.
+# 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
@@ -671,7 +659,7 @@ SHOW_NAMESPACES        = YES
 # by doxygen. Whatever the program writes to standard output is used as the file
 # version. For an example see the documentation.
 
-FILE_VERSION_FILTER    = 
+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
@@ -684,7 +672,7 @@ FILE_VERSION_FILTER    =
 # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
 # tag is left empty.
 
-LAYOUT_FILE            = 
+LAYOUT_FILE            =
 
 # 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
@@ -692,9 +680,10 @@ LAYOUT_FILE            =
 # 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.
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
 
-CITE_BIB_FILES         = 
+CITE_BIB_FILES         =
 
 #---------------------------------------------------------------------------
 # Configuration options related to warning and progress messages
@@ -708,7 +697,7 @@ CITE_BIB_FILES         =
 QUIET                  = NO
 
 # The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# 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.
@@ -716,7 +705,7 @@ QUIET                  = NO
 
 WARNINGS               = YES
 
-# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# 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.
@@ -733,18 +722,12 @@ WARN_IF_DOC_ERROR      = YES
 
 # 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.
+# 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
 
-# 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
@@ -759,7 +742,7 @@ WARN_FORMAT            = "$file:$line: $text"
 # messages should be written. If left blank the output is written to standard
 # error (stderr).
 
-WARN_LOGFILE           = 
+WARN_LOGFILE           =
 
 #---------------------------------------------------------------------------
 # Configuration options related to the input files
@@ -768,7 +751,7 @@ WARN_LOGFILE           =
 # 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
+# spaces.
 # Note: If this tag is empty the current directory is searched.
 
 INPUT                  = src
@@ -784,17 +767,12 @@ 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 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, *.f, *.for, *.tcl,
-# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js.
+# *.h) to filter out the source-files in the directories. 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, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
 
 FILE_PATTERNS          = *.h \
                          *.cpp
@@ -812,7 +790,7 @@ RECURSIVE              = YES
 # Note that relative paths are relative to the directory from which doxygen is
 # run.
 
-EXCLUDE                = 
+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
@@ -828,7 +806,7 @@ EXCLUDE_SYMLINKS       = NO
 # 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       = 
+EXCLUDE_PATTERNS       =
 
 # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
 # (namespaces, classes, functions, etc.) that should be excluded from the
@@ -839,20 +817,20 @@ EXCLUDE_PATTERNS       =
 # Note that the wildcards are matched against the file with absolute path, so to
 # exclude all test directories use the pattern */test/*
 
-EXCLUDE_SYMBOLS        = 
+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).
 
-EXAMPLE_PATH           = 
+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       = 
+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
@@ -865,7 +843,7 @@ EXAMPLE_RECURSIVE      = NO
 # that contain images that are to be included in the documentation (see the
 # \image command).
 
-IMAGE_PATH             = 
+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
@@ -881,12 +859,8 @@ IMAGE_PATH             =
 # 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           = 
+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
@@ -894,15 +868,11 @@ INPUT_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        = 
+FILTER_PATTERNS        =
 
 # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will also be used to filter the input files that are used for
+# 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.
 
@@ -914,14 +884,14 @@ FILTER_SOURCE_FILES    = NO
 # *.ext= (so without naming a filter).
 # This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
 
-FILTER_SOURCE_PATTERNS = 
+FILTER_SOURCE_PATTERNS =
 
 # 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 = 
+USE_MDFILE_AS_MAINPAGE =
 
 #---------------------------------------------------------------------------
 # Configuration options related to source browsing
@@ -962,7 +932,7 @@ REFERENCED_BY_RELATION = YES
 REFERENCES_RELATION    = YES
 
 # 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
+# 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.
@@ -1009,25 +979,6 @@ USE_HTAGS              = NO
 
 VERBATIM_HEADERS       = YES
 
-# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
-# cost of reduced performance. This can be particularly helpful with template
-# rich C++ code for which doxygen's built-in parser lacks the necessary type
-# information.
-# Note: The availability of this option depends on whether or not doxygen was
-# generated with the -Duse-libclang=ON option for CMake.
-# The default value is: NO.
-
-CLANG_ASSISTED_PARSING = NO
-
-# If clang assisted parsing is enabled you can provide the compiler with command
-# line options that you would normally use when invoking the compiler. Note that
-# the include paths will already be set by doxygen for the files and directories
-# specified with INPUT and INCLUDE_PATH.
-# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-
-CLANG_OPTIONS          = 
-
 #---------------------------------------------------------------------------
 # Configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
@@ -1052,13 +1003,13 @@ COLS_IN_ALPHA_INDEX    = 5
 # while generating the index headers.
 # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
 
-IGNORE_PREFIX          = 
+IGNORE_PREFIX          =
 
 #---------------------------------------------------------------------------
 # Configuration options related to the HTML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_HTML tag is set to YES, 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
@@ -1096,7 +1047,7 @@ HTML_FILE_EXTENSION    = .html
 # of the possible markers and block names see the documentation.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_HEADER            = 
+HTML_HEADER            =
 
 # 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
@@ -1106,7 +1057,7 @@ HTML_HEADER            =
 # that doxygen normally uses.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_FOOTER            = 
+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
@@ -1118,20 +1069,18 @@ HTML_FOOTER            =
 # obsolete.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_STYLESHEET        = 
+HTML_STYLESHEET        =
 
-# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
-# cascading style sheets that are included after the standard style sheets
+# 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 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.
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_EXTRA_STYLESHEET  = 
+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
@@ -1141,10 +1090,10 @@ HTML_EXTRA_STYLESHEET  =
 # 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       = 
+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
+# will adjust the colors in the stylesheet 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
@@ -1175,9 +1124,8 @@ 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 YES can help to show when doxygen was last run and thus if the
-# documentation is up to date.
-# The default value is: NO.
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
 HTML_TIMESTAMP         = YES
@@ -1270,31 +1218,31 @@ GENERATE_HTMLHELP      = NO
 # written to the html output directory.
 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
-CHM_FILE               = 
+CHM_FILE               =
 
 # 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,
+# 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           = 
+HHC_LOCATION           =
 
-# 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
 
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# 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     = 
+CHM_INDEX_ENCODING     =
 
-# 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
+# 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.
@@ -1322,7 +1270,7 @@ GENERATE_QHP           = NO
 # the HTML output folder.
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
-QCH_FILE               = 
+QCH_FILE               =
 
 # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
 # Project output. For more information please see Qt Help Project / Namespace
@@ -1347,7 +1295,7 @@ QHP_VIRTUAL_FOLDER     = doc
 # filters).
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
-QHP_CUST_FILTER_NAME   = 
+QHP_CUST_FILTER_NAME   =
 
 # 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
@@ -1355,21 +1303,21 @@ QHP_CUST_FILTER_NAME   =
 # filters).
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
-QHP_CUST_FILTER_ATTRS  = 
+QHP_CUST_FILTER_ATTRS  =
 
 # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
 # 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  = 
+QHP_SECT_FILTER_ATTRS  =
 
 # 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           = 
+QHG_LOCATION           =
 
 # 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
@@ -1408,7 +1356,7 @@ DISABLE_INDEX          = NO
 # 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
+# HTML help feature. Via custom stylesheets (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
@@ -1436,7 +1384,7 @@ ENUM_VALUES_PER_LINE   = 4
 
 TREEVIEW_WIDTH         = 250
 
-# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# 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.
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1465,7 +1413,7 @@ 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 pre-rendered bitmaps. Use this if you do not have LaTeX
+# 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.
@@ -1502,7 +1450,7 @@ MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
 # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
 # This tag requires that the tag USE_MATHJAX is set to YES.
 
-MATHJAX_EXTENSIONS     = 
+MATHJAX_EXTENSIONS     =
 
 # 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
@@ -1510,7 +1458,7 @@ MATHJAX_EXTENSIONS     =
 # example see the documentation.
 # This tag requires that the tag USE_MATHJAX is set to YES.
 
-MATHJAX_CODEFILE       = 
+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
@@ -1551,7 +1499,7 @@ SERVER_BASED_SEARCH    = NO
 # 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
+# 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/).
 #
@@ -1564,13 +1512,13 @@ EXTERNAL_SEARCH        = NO
 # The SEARCHENGINE_URL should point to a search engine hosted by a web server
 # which will return the search results when EXTERNAL_SEARCH is enabled.
 #
-# Doxygen ships with an example indexer (doxyindexer) and search engine
+# 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       = 
+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
@@ -1586,7 +1534,7 @@ SEARCHDATA_FILE        = searchdata.xml
 # projects and redirect the results back to the right project.
 # This tag requires that the tag SEARCHENGINE is set to YES.
 
-EXTERNAL_SEARCH_ID     = 
+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
@@ -1596,13 +1544,13 @@ EXTERNAL_SEARCH_ID     =
 # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
 # This tag requires that the tag SEARCHENGINE is set to YES.
 
-EXTRA_SEARCH_MAPPINGS  = 
+EXTRA_SEARCH_MAPPINGS  =
 
 #---------------------------------------------------------------------------
 # Configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_LATEX tag is set to YES, 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         = NO
@@ -1633,7 +1581,7 @@ LATEX_CMD_NAME         = latex
 
 MAKEINDEX_CMD_NAME     = makeindex
 
-# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# 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.
@@ -1651,12 +1599,9 @@ COMPACT_LATEX          = NO
 PAPER_TYPE             = a4wide
 
 # 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}
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
 # If left blank no extra packages will be included.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
@@ -1670,35 +1615,22 @@ EXTRA_PACKAGES         = amsmath
 #
 # 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.
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
+# replace them by respectively the title of the page, the current date and time,
+# only the current date, the version number of doxygen, the project name (see
+# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
-LATEX_HEADER           = 
+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. See
-# LATEX_HEADER for more information on how to generate a default footer and what
-# special commands can be used inside the footer.
+# chapter. If it is left blank doxygen will generate a standard 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           = 
-
-# 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 = 
+LATEX_FOOTER           =
 
 # 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
@@ -1706,7 +1638,7 @@ LATEX_EXTRA_STYLESHEET =
 # markers available.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
-LATEX_EXTRA_FILES      = 
+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
@@ -1717,8 +1649,8 @@ LATEX_EXTRA_FILES      =
 
 PDF_HYPERLINKS         = NO
 
-# 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
+# If the LATEX_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.
@@ -1759,19 +1691,11 @@ LATEX_SOURCE_CODE      = NO
 
 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
 #---------------------------------------------------------------------------
 
-# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# 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.
@@ -1786,7 +1710,7 @@ GENERATE_RTF           = NO
 
 RTF_OUTPUT             = rtf
 
-# If the COMPACT_RTF tag is set to YES, doxygen generates more compact 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.
 # The default value is: NO.
@@ -1814,30 +1738,20 @@ RTF_HYPERLINKS         = NO
 # default style sheet that doxygen normally uses.
 # This tag requires that the tag GENERATE_RTF is set to YES.
 
-RTF_STYLESHEET_FILE    = 
+RTF_STYLESHEET_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
+RTF_EXTENSIONS_FILE    =
 
 #---------------------------------------------------------------------------
 # Configuration options related to the man page output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
 # classes and files.
 # The default value is: NO.
 
@@ -1866,7 +1780,7 @@ MAN_EXTENSION          = .3
 # MAN_EXTENSION with the initial . removed.
 # This tag requires that the tag GENERATE_MAN is set to YES.
 
-MAN_SUBDIR             = 
+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
@@ -1881,7 +1795,7 @@ MAN_LINKS              = NO
 # Configuration options related to the XML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# 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.
 
@@ -1895,7 +1809,7 @@ GENERATE_XML           = NO
 
 XML_OUTPUT             = xml
 
-# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# 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.
@@ -1908,7 +1822,7 @@ XML_PROGRAMLISTING     = YES
 # Configuration options related to the DOCBOOK output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# 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.
 
@@ -1922,23 +1836,14 @@ GENERATE_DOCBOOK       = NO
 
 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
 #---------------------------------------------------------------------------
 
-# 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.
+# 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
@@ -1947,7 +1852,7 @@ GENERATE_AUTOGEN_DEF   = NO
 # Configuration options related to the Perl module output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# 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.
@@ -1955,7 +1860,7 @@ GENERATE_AUTOGEN_DEF   = NO
 
 GENERATE_PERLMOD       = NO
 
-# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# 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.
@@ -1963,9 +1868,9 @@ GENERATE_PERLMOD       = NO
 
 PERLMOD_LATEX          = NO
 
-# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# 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
+# 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.
@@ -1979,20 +1884,20 @@ PERLMOD_PRETTY         = YES
 # overwrite each other's variables.
 # This tag requires that the tag GENERATE_PERLMOD is set to YES.
 
-PERLMOD_MAKEVAR_PREFIX = 
+PERLMOD_MAKEVAR_PREFIX =
 
 #---------------------------------------------------------------------------
 # Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 
-# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# 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, only conditional compilation will be
+# 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.
@@ -2008,7 +1913,7 @@ MACRO_EXPANSION        = NO
 
 EXPAND_ONLY_PREDEF     = NO
 
-# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# If the SEARCH_INCLUDES tag is set to YES the includes 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.
@@ -2020,7 +1925,7 @@ SEARCH_INCLUDES        = YES
 # preprocessor.
 # This tag requires that the tag SEARCH_INCLUDES is set to YES.
 
-INCLUDE_PATH           = 
+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
@@ -2028,7 +1933,7 @@ INCLUDE_PATH           =
 # used.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
-INCLUDE_FILE_PATTERNS  = 
+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 e.g.
@@ -2038,7 +1943,7 @@ INCLUDE_FILE_PATTERNS  =
 # recursively expanded use the := operator instead of the = operator.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
-PREDEFINED             = 
+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
@@ -2047,7 +1952,7 @@ PREDEFINED             =
 # definition found in the source code.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
-EXPAND_AS_DEFINED      = 
+EXPAND_AS_DEFINED      =
 
 # 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
@@ -2084,21 +1989,20 @@ TAGFILES               = ../bpp-core/BppCore.tag=../../bpp-core/html/
 
 GENERATE_TAGFILE       = BppSeq.tag
 
-# 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.
+# 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
+# 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
+# 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.
@@ -2115,7 +2019,7 @@ PERL_PATH              = /usr/bin/perl
 # Configuration options related to the dot tool
 #---------------------------------------------------------------------------
 
-# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
+# 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
@@ -2131,16 +2035,16 @@ CLASS_DIAGRAMS         = YES
 # the mscgen tool resides. If left empty the tool is assumed to be found in the
 # default search path.
 
-MSCGEN_PATH            = 
+MSCGEN_PATH            =
 
 # 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               = 
+DIA_PATH               =
 
-# If set to YES the inheritance and collaboration graphs will hide inheritance
+# 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.
 
@@ -2165,7 +2069,7 @@ HAVE_DOT               = YES
 
 DOT_NUM_THREADS        = 0
 
-# When you want a differently looking font in the dot files that doxygen
+# When you want a differently looking font n 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
@@ -2187,7 +2091,7 @@ DOT_FONTSIZE           = 10
 # the path where dot can find it using this tag.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
-DOT_FONTPATH           = 
+DOT_FONTPATH           =
 
 # 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.
@@ -2213,7 +2117,7 @@ COLLABORATION_GRAPH    = 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.
@@ -2265,8 +2169,7 @@ INCLUDED_BY_GRAPH      = YES
 #
 # 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.
+# functions only using the \callgraph command.
 # The default value is: NO.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
@@ -2277,8 +2180,7 @@ CALL_GRAPH             = NO
 #
 # 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.
+# functions only using the \callergraph command.
 # The default value is: NO.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
@@ -2301,17 +2203,13 @@ GRAPHICAL_HIERARCHY    = YES
 DIRECTORY_GRAPH        = YES
 
 # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# 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/)).
+# generated by dot.
 # 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, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
 # png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
-# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
-# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
-# png:gdiplus:gdiplus.
+# gif:cairo:gd, gif:gd, gif:gd:gd and svg.
 # The default value is: png.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
@@ -2333,39 +2231,26 @@ INTERACTIVE_SVG        = NO
 # 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               = 
+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).
 # This tag requires that the tag HAVE_DOT is set to YES.
 
-DOTFILE_DIRS           = 
+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).
 
-MSCFILE_DIRS           = 
+MSCFILE_DIRS           =
 
 # 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 specified paths are searched for files specified by
-# the !include statement in a plantuml block.
-
-PLANTUML_INCLUDE_PATH  = 
+DIAFILE_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
@@ -2403,7 +2288,7 @@ MAX_DOT_GRAPH_DEPTH    = 0
 
 DOT_TRANSPARENT        = NO
 
-# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# Set the DOT_MULTI_TARGETS tag to YES 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.
@@ -2420,7 +2305,7 @@ DOT_MULTI_TARGETS      = YES
 
 GENERATE_LEGEND        = YES
 
-# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
+# 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.
diff --git a/src/Bpp/Seq/Alphabet/AlphabetTools.cpp b/src/Bpp/Seq/Alphabet/AlphabetTools.cpp
index 6585ab9..d0def5b 100644
--- a/src/Bpp/Seq/Alphabet/AlphabetTools.cpp
+++ b/src/Bpp/Seq/Alphabet/AlphabetTools.cpp
@@ -91,6 +91,7 @@ bool AlphabetTools::checkAlphabetCodingSize(const Alphabet& alphabet) throw (Alp
   if (alphabet.getNumberOfChars() == 0)
     return true;  // Will this really happen?
   size_t size = alphabet.intToChar(0).size();
+
   for (int i = 1; i < static_cast<int>(alphabet.getNumberOfTypes()); ++i)
   {
     if (alphabet.intToChar(i).size() != size)
diff --git a/src/Bpp/Seq/Alphabet/AlphabetTools.h b/src/Bpp/Seq/Alphabet/AlphabetTools.h
index ed7f4af..c2cb310 100644
--- a/src/Bpp/Seq/Alphabet/AlphabetTools.h
+++ b/src/Bpp/Seq/Alphabet/AlphabetTools.h
@@ -45,6 +45,7 @@
 #include "ProteicAlphabet.h"
 #include "DefaultAlphabet.h"
 #include "CodonAlphabet.h"
+#include "WordAlphabet.h"
 #include "RNY.h"
 #include "BinaryAlphabet.h"
 #include <Bpp/Numeric/VectorTools.h>
@@ -168,7 +169,7 @@ public:
    * @return True if the alphabet is an instanciation of the WordAlphabet class.
    * @param alphabet The alphabet to check.
    */
-  static bool isWordAlphabet(const Alphabet* alphabet) { return alphabetInheritsFrom<WordAlphabet>(alphabet); }
+  static bool isWordAlphabet(const Alphabet* alphabet) { return alphabetInheritsFrom<CoreWordAlphabet>(alphabet); }
 
   /**
    * @return True if the alphabet is an instanciation of the RNY class.
@@ -221,7 +222,7 @@ private:
     try
     {
       const Y* t = dynamic_cast<const Y*>(alphabet);
-      return t != 0; // Solves strange behavior in new gcc?
+      return t != nullptr;
     }
     catch (std::exception& e)
     {
diff --git a/src/Bpp/Seq/Alphabet/CodonAlphabet.cpp b/src/Bpp/Seq/Alphabet/CodonAlphabet.cpp
index 9072c02..9f3241c 100644
--- a/src/Bpp/Seq/Alphabet/CodonAlphabet.cpp
+++ b/src/Bpp/Seq/Alphabet/CodonAlphabet.cpp
@@ -47,75 +47,156 @@ using namespace bpp;
 
 using namespace std;
 
-/******************************************************************************/
 
-int CodonAlphabet::getCodon(int pos1, int pos2, int pos3) const
-throw (BadIntException)
+void CodonAlphabet::build_()
 {
-  vector<int> vint;
-  vint.push_back(pos1);
-  vint.push_back(pos2);
-  vint.push_back(pos3);
-  
-  return getWord(vint);
-}
+  vector<AlphabetState*> states(66);
 
-/******************************************************************************/
+  states[0] = new AlphabetState(-1, "---", "gap");
+
+  size_t i=0;
+  for (int i1 = 0; i1 < 4; ++i1)
+    for (int i2 = 0; i2 < 4; ++i2)
+      for (int i3 = 0; i3 < 4; ++i3)
+      {
+        string s=nAlph_->intToChar(i1)+nAlph_->intToChar(i2)+nAlph_->intToChar(i3);
+        states[i+1] = new AlphabetState(static_cast<int>(i), s, s);
+        i++;
+      }
+
+
+  states[65] = new AlphabetState(static_cast<int>(64), "NNN", "Unresolved");
+
+  //Now register all states once for all:
+  for (i = 0; i < states.size(); ++i) 
+    registerState(states[i]);
 
-string CodonAlphabet::getCodon(const string & pos1, const string & pos2, const string & pos3) const
-throw (BadCharException)
-{
-  vector<string> vint;
-  vint.push_back(pos1);
-  vint.push_back(pos2);
-  vint.push_back(pos3);
-  
-  return getWord(vint);
 }
 
-/******************************************************************************/
+int CodonAlphabet::getGCinCodon(int codon) const
+{
+  int i=0;
+  int j=getFirstPosition(codon);
+  if (j==1 || j==2)
+    i++;
+  j=getSecondPosition(codon);
+  if (j==1 || j==2)
+    i++;
+  j=getThirdPosition(codon);
+  if (j==1 || j==2)
+    i++;
+
+  return i;
+}
 
-int CodonAlphabet::getFirstPosition (int codon) const throw (BadIntException)
+bool CodonAlphabet::containsUnresolved(const std::string& state) const
 {
-  return getNPosition(codon,0);
+  if (state.length() != 3)
+    throw BadCharException(state, "CodonAlphabet::containsUnresolved", this);
+
+  for (size_t i = 0; i < 3; i++)
+  {
+    if (nAlph_->isUnresolved(state.substr(i, 1)))
+    {
+      return true;
+    }
+  }
+  return false;
 }
 
 /******************************************************************************/
 
-int CodonAlphabet::getSecondPosition(int codon) const throw (BadIntException)
+bool CodonAlphabet::containsGap(const std::string& state) const
 {
-  return getNPosition(codon,1);
+  if (state.length() != 3)
+    throw BadCharException(state, "CodonAlphabet::containsGap", this);
+
+  for (size_t i = 0; i < 3; i++)
+  {
+    if (nAlph_->isGap(state.substr(i, 1)))
+      return true;
+  }
+
+  return false;
 }
 
-/******************************************************************************/
 
-int CodonAlphabet::getThirdPosition (int codon) const throw (BadIntException)
+/****************************************************************************************/
+
+Sequence* CodonAlphabet::translate(const Sequence& sequence, size_t pos) const
 {
-  return getNPosition(codon,2);
+  vector<int> content;
+  
+  size_t s = sequence.size();
+  size_t i = pos;
+  
+  while (i + 3 <= s)
+  {
+    content.push_back(getWord(sequence, i));
+    i += 3;
+  }
+
+  return new BasicSequence(sequence.getName(), content, this);
 }
 
-/******************************************************************************/
+/****************************************************************************************/
 
-string CodonAlphabet::getFirstPosition (const string & codon) const
-throw (BadCharException)
+Sequence* CodonAlphabet::reverse(const Sequence& sequence) const
 {
-  return getNPosition(codon,0);
+  Sequence* pseq = new BasicSequence(sequence.getName(), "", getNAlphabet(0));
+
+  size_t s = sequence.size();
+  for (size_t i = 0; i < s; i++)
+  {
+    pseq->append(getPositions(sequence[i]));
+  }
+
+  return pseq;
 }
 
-/******************************************************************************/
+/****************************************************************************************/
 
-string CodonAlphabet::getSecondPosition(const string & codon) const
-throw (BadCharException)
+std::vector<int> CodonAlphabet::getAlias(int state) const throw (BadIntException)
 {
-  return getNPosition(codon,1);
+  if (!isIntInAlphabet(state))
+    throw BadIntException(state, "WordAlphabet::getAlias(int): Specified base unknown.");
+  vector<int> v;
+
+  if (state == 64)
+  {
+    v.resize(64);
+    for (size_t i = 0; i < 64; ++i)
+    {
+      v[i] = static_cast<int>(i);
+    }
+  }
+  else
+  {
+    v.resize(1); v[0] = state;
+  }
+  return v;
 }
 
 /******************************************************************************/
 
-string CodonAlphabet::getThirdPosition (const string & codon) const
-throw (BadCharException)
+std::vector<std::string> CodonAlphabet::getAlias(const std::string& state) const throw (BadCharException)
 {
-  return getNPosition(codon,2);
+  string locstate = TextTools::toUpper(state);
+  if (!isCharInAlphabet(locstate))
+    throw BadCharException(locstate, "CodonAlphabet::getAlias(string): Specified base unknown.");
+  vector<string> v;
+
+  if (locstate == "NNN")
+  {
+    v.resize(64);
+    for (size_t i = 0; i < 64; ++i)
+    {
+      v[i] = intToChar(static_cast<int>(i));
+    }
+  }
+  else
+  {
+    v.resize(1); v[0] = state;
+  }
+  return v;
 }
-
-/******************************************************************************/
diff --git a/src/Bpp/Seq/Alphabet/CodonAlphabet.h b/src/Bpp/Seq/Alphabet/CodonAlphabet.h
index 5715bad..fa5a05c 100644
--- a/src/Bpp/Seq/Alphabet/CodonAlphabet.h
+++ b/src/Bpp/Seq/Alphabet/CodonAlphabet.h
@@ -5,47 +5,47 @@
 //
 
 /*
-Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
-
-This software is a computer program whose purpose is to provide classes
-for sequences analysis.
-
-This software is governed by the CeCILL license under French law and
-abiding by the rules of distribution of free software. You can use,
-modify and/ or redistribute the software under the terms of the CeCILL
-license as circulated by CEA, CNRS and INRIA at the following URL
-"http://www.cecill.info".
-
-As a counterpart to the access to the source code and rights to copy,
-modify and redistribute granted by the license, users are provided
-only with a limited warranty and the software's author, the holder of
-the economic rights, and the successive licensors have only limited
-liability.
-
-In this respect, the user's attention is drawn to the risks associated
-with loading, using, modifying and/or developing or reproducing the
-software by the user in light of its specific status of free software,
-that may mean that it is complicated to manipulate, and that also
-therefore means that it is reserved for developers and experienced
-professionals having in-depth computer knowledge. Users are therefore
-encouraged to load and test the software's suitability as regards
-their requirements in conditions enabling the security of their
-systems and/or data to be ensured and, more generally, to use and
-operate it in the same conditions as regards security.
-
-The fact that you are presently reading this means that you have had
-knowledge of the CeCILL license and that you accept its terms.
+  Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
+
+  This software is a computer program whose purpose is to provide classes
+  for sequences analysis.
+
+  This software is governed by the CeCILL license under French law and
+  abiding by the rules of distribution of free software. You can use,
+  modify and/ or redistribute the software under the terms of the CeCILL
+  license as circulated by CEA, CNRS and INRIA at the following URL
+  "http://www.cecill.info".
+
+  As a counterpart to the access to the source code and rights to copy,
+  modify and redistribute granted by the license, users are provided
+  only with a limited warranty and the software's author, the holder of
+  the economic rights, and the successive licensors have only limited
+  liability.
+
+  In this respect, the user's attention is drawn to the risks associated
+  with loading, using, modifying and/or developing or reproducing the
+  software by the user in light of its specific status of free software,
+  that may mean that it is complicated to manipulate, and that also
+  therefore means that it is reserved for developers and experienced
+  professionals having in-depth computer knowledge. Users are therefore
+  encouraged to load and test the software's suitability as regards
+  their requirements in conditions enabling the security of their
+  systems and/or data to be ensured and, more generally, to use and
+  operate it in the same conditions as regards security.
+
+  The fact that you are presently reading this means that you have had
+  knowledge of the CeCILL license and that you accept its terms.
 */
 
 #ifndef _CODONALPHABET_H_
 #define _CODONALPHABET_H_
 
-#include "WordAlphabet.h"
 #include "NucleicAlphabet.h"
-
+#include "WordAlphabet.h"
+ 
 // From the STL:
 #include <string>
-
+#include <memory>
 
 namespace bpp
 {
@@ -54,135 +54,412 @@ namespace bpp
  * @brief Codon alphabet class.
  * @author Laurent Guéguen, Julien Dutheil
  * 
- * A codon alphabet object is a particular case of WordAlphabet with three letters. 
  * Since codons are made of 3 nucleic bases (RNA or DNA), this class
  * has a NucleicAlphabet field used to check char description. This
  * nucleic alphabet is passed to the constructor. This class also adds
  * some methods specific to codon manipulation.
  */
-class CodonAlphabet:
-  public WordAlphabet
-{
-public: // Constructor and destructor.
+  
+  class CodonAlphabet:
+    public virtual CoreWordAlphabet,
+    public AbstractAlphabet
+  {
+  protected:
+    const NucleicAlphabet* nAlph_;
+  
+  public: // Constructor and destructor.
 		
-  /**
-   * @brief Builds a new codon alphabet from a nucleic alphabet.
-   * 
-   * @param alpha The nucleic alphabet to be used.
-   */
-  CodonAlphabet(const NucleicAlphabet* alpha) :
-    WordAlphabet(alpha, 3) {}
+    /**
+     * @brief Builds a new codon alphabet from a nucleic alphabet.
+     * 
+     * @param alpha The nucleic alphabet to be used.
+     */
+    CodonAlphabet(const NucleicAlphabet* alpha) :
+      AbstractAlphabet(),
+      nAlph_(alpha)
+    {
+      build_();  
+    }
 
-  CodonAlphabet(const CodonAlphabet& bia) : WordAlphabet(bia) {}
+    CodonAlphabet(const CodonAlphabet& bia) :
+      AbstractAlphabet(bia),
+      nAlph_(bia.nAlph_)
+    {}
 
-  CodonAlphabet& operator=(const CodonAlphabet& bia)
-  {
-    WordAlphabet::operator=(bia);
-    return *this;
-  }
+    CodonAlphabet& operator=(const CodonAlphabet& bia)
+    {
+      AbstractAlphabet::operator=(bia);
+      nAlph_ = bia.nAlph_;
+    
+      return *this;
+    }
   
-  CodonAlphabet* clone() const
-  {
-    return new CodonAlphabet(*this);
-  }
+    CodonAlphabet* clone() const
+    {
+      return new CodonAlphabet(*this);
+    }
 
-  virtual ~CodonAlphabet() {}
+    virtual ~CodonAlphabet() {}
   
-  std::string getAlphabetType() const
-  {
-    return "Codon(letter="+ vAbsAlph_[0]->getAlphabetType() + ")";
-  }
-
-  
-public:
-  
-  /**
-   * @name Codon specific methods
-   *
-   * @{
-   */
-
-  /**
-   * @brief Get the int code for a codon given the int code of the three underlying positions.
-   *
-   * The int code of each position must match the nucleic alphabet specified for this alphabet.
-   * @param pos1 Int description for position 1.
-   * @param pos2 Int description for position 2.
-   * @param pos3 Int description for position 3.
-   * @return The int code of the codon.
-   */
-  virtual int getCodon(int pos1, int pos2, int pos3) const throw (BadIntException);
-  
-  /**
-   * @brief Get the char code for a codon given the char code of the three underlying positions.
-   *
-   * The char code of each position must match the nucleic alphabet specified for this alphabet.
-   * NB: This performs pos1 + pos2 + pos3 after checking for each position validity.
-   * @param pos1 Char description for position 1.
-   * @param pos2 Char description for position 2.
-   * @param pos3 Char description for position 3.
-   * @return The Char code of the codon.
-   */
-  virtual std::string getCodon(const std::string& pos1, const std::string& pos2, const std::string& pos3) const throw (BadCharException);
-  
-  /**
-   * @brief Get the int code of the first position of a codon given its int description.
-   * 
-   * @param codon The int description of the codon.
-   * @return The int description of the first position of the codon.
-   */
-  virtual int getFirstPosition(int codon) const throw (BadIntException);
-  
-  /**
-   * @brief Get the int code of the second position of a codon given its int description.
-   * 
-   * @param codon The int description of the codon.
-   * @return The int description of the second position of the codon.
-   */
-  virtual int getSecondPosition(int codon) const throw (BadIntException);
-  
-  /**
-   * @brief Get the int code of the third position of a codon given its int description.
-   * 
-   * @param codon The int description of the codon.
-   * @return The int description of the third position of the codon.
-   */
-  virtual int getThirdPosition(int codon) const throw (BadIntException);
-  
-  /**
-   * @brief Get the char code of the first position of a codon given its char description.
-   * 
-   * @param codon The char description of the codon.
-   * @return The char description of the first position of the codon.
-   */
-  virtual std::string getFirstPosition (const std::string& codon) const throw (BadCharException);
-  
-  /**
-   * @brief Get the char code of the second position of a codon given its char description.
-   * 
-   * @param codon The char description of the codon.
-   * @return The char description of the second position of the codon.
-   */
-  virtual std::string getSecondPosition(const std::string& codon) const throw (BadCharException);
-  
-  /**
-   * @brief Get the char code of the third position of a codon given its char description.
-   * 
-   * @param codon The char description of the codon.
-   * @return The char description of the third position of the codon.
-   */
-  virtual std::string getThirdPosition(const std::string& codon) const throw (BadCharException);
-  
-  /**
-   * @return The nucleic alphabet associated to this codon alphabet.
-   */
-  virtual const NucleicAlphabet* const getNucleicAlphabet() const
-  {
-    return dynamic_cast<const NucleicAlphabet*>(vAbsAlph_[0]);
-  }
+    std::string getAlphabetType() const
+    {
+      return "Codon(letter="+ nAlph_->getAlphabetType() + ")";
+    }
+
+  private:
+    /**
+     * @name Inner utilitary functions
+     *
+     * @{
+     */
+    bool containsUnresolved(const std::string& state) const;
+    
+    bool containsGap(const std::string& state) const;
+
+    void build_();
+
+    /** @} */
+
+  public:
+
+    /**
+     * @name From AbstractAlphabet
+     *
+     * @{
+     */
+  
+    unsigned int getNumberOfTypes() const {return 65;}
+  
+    unsigned int getSize() const 
+    {
+      return 64;
+    }
+
+    int getUnknownCharacterCode() const 
+    {
+      return 64;
+    }
+
+    bool isUnresolved(int state) const
+    {
+      return state>=64;
+    }
+
+    bool isUnresolved(const std::string& state) const
+    {
+      return isUnresolved(charToInt(state));
+    }
+
+    std::vector<int> getAlias(int state) const throw (BadIntException);
+
+    std::vector<std::string> getAlias(const std::string& state) const throw (BadCharException);
+    
+    int getGeneric(const std::vector<int>& states) const throw (BadIntException)
+    {
+      return states[0];
+    }
+
+    std::string getGeneric(const std::vector<std::string>& states) const throw (BadCharException)
+    {
+      return states[0];
+    }
+    
+    int charToInt(const std::string& state) const throw (BadCharException)
+    {
+      if (state.size() != 3)
+        throw BadCharException(state, "CodonAlphabet::charToInt", this);
+      if (containsUnresolved(state))
+        return static_cast<int>(getSize());
+      if (containsGap(state))
+        return -1;
+      else return AbstractAlphabet::charToInt(state);
+    }
+
+    /**
+     * @name Codon specific methods
+     *
+     * @{
+     */
+
+    /**
+     * @brief Get the int code for a codon given the int code of the three underlying positions.
+     *
+     * The int code of each position must match the nucleic alphabet specified for this alphabet.
+     * @param pos1 Int description for position 1.
+     * @param pos2 Int description for position 2.
+     * @param pos3 Int description for position 3.
+     * @return The int code of the codon.
+     */
+
+    int getCodon(int pos1, int pos2, int pos3) const
+    {
+      return (nAlph_->isUnresolved(pos1)
+              || nAlph_->isUnresolved(pos2)
+              || nAlph_->isUnresolved(pos3))? getUnknownCharacterCode()
+        : pos3 + 4*pos2 + 16 * pos1;
+    }
+
+    /**
+     * @brief Get the char code for a codon given the char code of the
+     * three underlying positions.
+     *
+     * The char code of each position must match the nucleic alphabet
+     * specified for this alphabet.
+     *
+     * NB: This performs pos1 + pos2 + pos3 after checking for each
+     * position validity.
+     *
+     * @param pos1 Char description for position 1.
+     * @param pos2 Char description for position 2.
+     * @param pos3 Char description for position 3.
+     * @return The Char code of the codon.
+     */
+
+    std::string getCodon(const std::string& pos1, const std::string& pos2, const std::string& pos3) const
+    {
+      return pos1+pos2+pos3;
+    }
+  
+    /**
+     * @brief Get the int code of the first position of a codon given its int description.
+     * 
+     * @param codon The int description of the codon.
+     * @return The int description of the first position of the codon.
+     */
+    
+    int getFirstPosition(int codon) const
+    {
+      return isUnresolved(codon)?nAlph_->charToInt("N"):codon / 16;
+    }
   
-  /** @} */
-};
+    /**
+     * @brief Get the int code of the second position of a codon given its int description.
+     * 
+     * @param codon The int description of the codon.
+     * @return The int description of the second position of the codon.
+     */
+
+    int getSecondPosition(int codon) const
+    {
+      return isUnresolved(codon)?nAlph_->charToInt("N"):(codon / 4) % 4;
+    }
+  
+  
+    /**
+     * @brief Get the int code of the third position of a codon given its int description.
+     * 
+     * @param codon The int description of the codon.
+     * @return The int description of the third position of the codon.
+     */
+
+    int getThirdPosition(int codon) const
+    {
+      return isUnresolved(codon)?nAlph_->charToInt("N"):codon % 4;
+    }
+  
+    /**
+     * @brief Get the char code of the first position of a codon given its char description.
+     * 
+     * @param codon The char description of the codon.
+     * @return The char description of the first position of the codon.
+     */
+
+    std::string getFirstPosition (const std::string& codon) const
+    {
+      return codon.substr(0,1);
+    }
+  
+  
+    /**
+     * @brief Get the char code of the second position of a codon given its char description.
+     * 
+     * @param codon The char description of the codon.
+     * @return The char description of the second position of the codon.
+     */
+  
+    std::string getSecondPosition(const std::string& codon) const
+    {
+      return codon.substr(1,1);
+    }
+  
+
+    /**
+     * @brief Get the char code of the third position of a codon given its char description.
+     * 
+     * @param codon The char description of the codon.
+     * @return The char description of the third position of the codon.
+     */
+
+    std::string getThirdPosition(const std::string& codon) const
+    {
+      return codon.substr(2,1);
+    }
+
+
+    /**
+     * @name From CoreWordAlphabet
+     *
+     * @{
+     */
+    
+    unsigned int getLength() const 
+    {
+      return 3;
+    }
+    
+    bool hasUniqueAlphabet() const 
+    {
+      return true;
+    }
+
+    const Alphabet* getNAlphabet(size_t n) const 
+    {
+      return nAlph_;
+    }
+
+    int getWord(const Sequence& seq, size_t pos = 0) const
+    {
+      if (seq.size() < pos + 3)
+        throw IndexOutOfBoundsException("CodonAlphabet::getWord", pos, 0, seq.size() - 3);
+      return getCodon(seq[pos], seq[pos+1], seq[pos+2]);
+    }
+
+    /**
+     * @brief Get the char code for a word given the char code of the
+     * underlying positions.
+     *
+     * The char code of each position must match the corresponding alphabet specified at this position.
+     * @param vpos vector description for all the positions.
+     * @param pos the start position to match in the vector.
+     * @return The string of the word.
+     * @throw IndexOutOfBoundsException In case of wrong position.
+     */
+    
+    std::string getWord(const std::vector<std::string>& vpos, size_t pos = 0) const
+    {    
+      if (vpos.size() < pos + 3)
+        throw IndexOutOfBoundsException("CodonAlphabet::getWord", pos, 0, vpos.size() - 3);
+
+      return getCodon(vpos[pos], vpos[pos+1], vpos[pos+2]);
+    }
+
+    int getWord(const std::vector<int>& vpos, size_t pos = 0) const
+    {    
+      if (vpos.size() < pos + 3)
+        throw IndexOutOfBoundsException("CodonAlphabet::getWord", pos, 0, vpos.size() - 3);
+
+      return getCodon(vpos[pos], vpos[pos+1], vpos[pos+2]);
+    }
+
+    
+    int getNPosition(int codon, size_t pos) const 
+    {
+      if (isUnresolved(codon))
+        return nAlph_->getUnknownCharacterCode();
+      else
+        return (pos==0 ? codon/16:
+                (pos==1? (codon/4)%4
+                 : codon%4));
+    }
+    
+    /**
+     * @brief Get the int codes of each position of a word given its int description.
+     *
+     * @param word The int description of the word.
+     * @return The int description of the positions of the codon.
+     */
+
+    std::vector<int> getPositions(int word) const
+    {
+      if (isUnresolved(word))
+      {
+        int n=nAlph_->getUnknownCharacterCode();
+        return std::vector<int>{n,n,n};
+      }
+      else
+        return std::vector<int>{word / 16, (word/4)%4, word%4};
+    }
+
+
+    /**
+     * @brief Get the char code of the Nth position of a codon given its char description.
+     * 
+     * @param codon The char description of the codon.
+     * @param pos the position in the codon (starting at 0)
+     * @return The char description of the position of the codon.
+     */
+
+    std::string getNPosition(const std::string& codon, size_t pos) const
+    {
+      return codon.substr(pos,1);
+    }
+
+    /**
+     * @brief Get the char codes of each position of a word given its char description.
+     *
+     * @param word The char description of the word.
+     * @return The char description of the three positions of the word.
+     */
+
+    std::vector<std::string> getPositions(const std::string& word) const
+    {
+      return std::vector<std::string>{word.substr(0,1), word.substr(1,1), word.substr(2,1)};
+    }
+
+    /**
+     * @brief Translate a whole sequence from letters alphabet to words alphabet.
+     *
+     * @param sequence A sequence in letters alphabet.
+     * @param pos the start postion (default 0)
+     * @return The corresponding sequence in words alphabet.
+     * @throw AlphabetMismatchException If the sequence alphabet do not match the source alphabet.
+     * @throw Exception                 Other kind of error, depending on the implementation.
+     */
+
+    Sequence* translate(const Sequence &sequence, size_t = 0) const;
+
+    /**
+     * @brief Translate a whole sequence from words alphabet to letters alphabet.
+     *
+     * @param sequence A sequence in words alphabet.
+     * @return The corresponding sequence in letters alphabet.
+     * @throw AlphabetMismatchException If the sequence alphabet do not match the target alphabet.
+     * @throw Exception                 Other kind of error, depending on the implementation.
+     */
+    
+    Sequence* reverse(const Sequence& sequence) const;
+
+    /*
+     *
+     * @}
+     */
+    
+    /**
+     * @brief Get the number of G+C in codon
+     * @param codon The int description of the codon.
+     *
+     * @return The number of G+C in codon
+     */
+  
+    int getGCinCodon(int codon) const;
+
+    /**
+     * @return The nucleic alphabet associated to this codon alphabet.
+     */
+
+    const NucleicAlphabet* const getNucleicAlphabet() const
+    {
+      return nAlph_;
+    }
+
+    /**
+     * @name Overloaded AbstractAlphabet methods.
+     * @{
+     */
+
+    unsigned int getStateCodingSize() const { return 3; }
+    /** @} */
+  };
 
 } //end of namespace bpp.
 
diff --git a/src/Bpp/Seq/Alphabet/WordAlphabet.cpp b/src/Bpp/Seq/Alphabet/WordAlphabet.cpp
index 862584a..2a26792 100644
--- a/src/Bpp/Seq/Alphabet/WordAlphabet.cpp
+++ b/src/Bpp/Seq/Alphabet/WordAlphabet.cpp
@@ -157,7 +157,7 @@ bool WordAlphabet::hasUniqueAlphabet() const
   return true;
 }
 
-bool WordAlphabet::containsUnresolved(const std::string& state) const throw (BadCharException)
+bool WordAlphabet::containsUnresolved(const std::string& state) const
 {
   size_t s = vAbsAlph_.size();
   if (state.length() != s)
@@ -175,7 +175,7 @@ bool WordAlphabet::containsUnresolved(const std::string& state) const throw (Bad
 
 /******************************************************************************/
 
-bool WordAlphabet::containsGap(const std::string& state) const throw (BadCharException)
+bool WordAlphabet::containsGap(const std::string& state) const
 {
   size_t s = vAbsAlph_.size();
   if (state.length() != s)
@@ -276,7 +276,7 @@ std::string WordAlphabet::getGeneric(const std::vector<std::string>& states) con
 
 /******************************************************************************/
 
-int WordAlphabet::getWord(const Sequence& seq, size_t pos) const throw (IndexOutOfBoundsException)
+int WordAlphabet::getWord(const Sequence& seq, size_t pos) const
 {
   if (seq.size() < pos + vAbsAlph_.size())
     throw IndexOutOfBoundsException("WordAlphabet::getWord", pos, 0, seq.size() - vAbsAlph_.size());
@@ -293,7 +293,7 @@ int WordAlphabet::getWord(const Sequence& seq, size_t pos) const throw (IndexOut
 
 /******************************************************************************/
 
-int WordAlphabet::getWord(const std::vector<int>& vint, size_t pos) const throw (IndexOutOfBoundsException)
+int WordAlphabet::getWord(const std::vector<int>& vint, size_t pos) const
 {
   if (vint.size() < pos + vAbsAlph_.size())
     throw IndexOutOfBoundsException("WordAlphabet::getWord", pos, 0, vint.size() - vAbsAlph_.size());
@@ -309,7 +309,7 @@ int WordAlphabet::getWord(const std::vector<int>& vint, size_t pos) const throw
 
 /****************************************************************************************/
 
-std::string WordAlphabet::getWord(const std::vector<string>& vpos, size_t pos) const throw (IndexOutOfBoundsException, BadCharException)
+std::string WordAlphabet::getWord(const std::vector<string>& vpos, size_t pos) const
 {
   if (vpos.size() < pos + vAbsAlph_.size())
     throw IndexOutOfBoundsException("WordAlphabet::getWord", pos, 0, vpos.size() - vAbsAlph_.size());
@@ -326,7 +326,7 @@ std::string WordAlphabet::getWord(const std::vector<string>& vpos, size_t pos) c
 
 /****************************************************************************************/
 
-Sequence* WordAlphabet::translate(const Sequence& sequence, size_t pos) const throw (AlphabetMismatchException, Exception)
+Sequence* WordAlphabet::translate(const Sequence& sequence, size_t pos) const
 {
   if ((!hasUniqueAlphabet()) or
       (sequence.getAlphabet()->getAlphabetType() != vAbsAlph_[0]->getAlphabetType()))
@@ -349,7 +349,7 @@ Sequence* WordAlphabet::translate(const Sequence& sequence, size_t pos) const th
 
 /****************************************************************************************/
 
-Sequence* WordAlphabet::reverse(const Sequence& sequence) const throw (AlphabetMismatchException, Exception)
+Sequence* WordAlphabet::reverse(const Sequence& sequence) const
 {
   if ((!hasUniqueAlphabet()) or
       (sequence.getAlphabet()->getAlphabetType() != getAlphabetType()))
diff --git a/src/Bpp/Seq/Alphabet/WordAlphabet.h b/src/Bpp/Seq/Alphabet/WordAlphabet.h
index 94141a3..9dd63b2 100644
--- a/src/Bpp/Seq/Alphabet/WordAlphabet.h
+++ b/src/Bpp/Seq/Alphabet/WordAlphabet.h
@@ -5,37 +5,37 @@
 //
 
 /*
-   Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
-
-   This software is a computer program whose purpose is to provide classes
-   for sequences analysis.
-
-   This software is governed by the CeCILL license under French law and
-   abiding by the rules of distribution of free software. You can use,
-   modify and/ or redistribute the software under the terms of the CeCILL
-   license as circulated by CEA, CNRS and INRIA at the following URL
-   "http://www.cecill.info".
-
-   As a counterpart to the access to the source code and rights to copy,
-   modify and redistribute granted by the license, users are provided
-   only with a limited warranty and the software's author, the holder of
-   the economic rights, and the successive licensors have only limited
-   liability.
-
-   In this respect, the user's attention is drawn to the risks associated
-   with loading, using, modifying and/or developing or reproducing the
-   software by the user in light of its specific status of free software,
-   that may mean that it is complicated to manipulate, and that also
-   therefore means that it is reserved for developers and experienced
-   professionals having in-depth computer knowledge. Users are therefore
-   encouraged to load and test the software's suitability as regards
-   their requirements in conditions enabling the security of their
-   systems and/or data to be ensured and, more generally, to use and
-   operate it in the same conditions as regards security.
-
-   The fact that you are presently reading this means that you have had
-   knowledge of the CeCILL license and that you accept its terms.
- */
+  Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
+
+  This software is a computer program whose purpose is to provide classes
+  for sequences analysis.
+
+  This software is governed by the CeCILL license under French law and
+  abiding by the rules of distribution of free software. You can use,
+  modify and/ or redistribute the software under the terms of the CeCILL
+  license as circulated by CEA, CNRS and INRIA at the following URL
+  "http://www.cecill.info".
+
+  As a counterpart to the access to the source code and rights to copy,
+  modify and redistribute granted by the license, users are provided
+  only with a limited warranty and the software's author, the holder of
+  the economic rights, and the successive licensors have only limited
+  liability.
+
+  In this respect, the user's attention is drawn to the risks associated
+  with loading, using, modifying and/or developing or reproducing the
+  software by the user in light of its specific status of free software,
+  that may mean that it is complicated to manipulate, and that also
+  therefore means that it is reserved for developers and experienced
+  professionals having in-depth computer knowledge. Users are therefore
+  encouraged to load and test the software's suitability as regards
+  their requirements in conditions enabling the security of their
+  systems and/or data to be ensured and, more generally, to use and
+  operate it in the same conditions as regards security.
+
+  The fact that you are presently reading this means that you have had
+  knowledge of the CeCILL license and that you accept its terms.
+*/
 
 #ifndef _WORDALPHABET_H_
 #define _WORDALPHABET_H_
@@ -50,6 +50,133 @@
 
 namespace bpp
 {
+
+/**
+ * @brief The interface class for word alphabets.
+ *
+ */
+  
+  class CoreWordAlphabet 
+  {
+  public:
+    CoreWordAlphabet() {}
+
+    virtual ~CoreWordAlphabet() {}
+    
+    virtual unsigned int getLength() const = 0;
+
+    virtual unsigned int getSize() const = 0;
+    
+    virtual bool hasUniqueAlphabet() const = 0;
+
+    virtual const Alphabet* getNAlphabet(size_t n) const = 0;
+
+    virtual int getWord(const Sequence& seq, size_t pos = 0) const = 0;
+
+    
+    /**
+     * @brief Get the int code for a word given the int code of the underlying positions.
+     *
+     * The int code of each position must match the corresponding alphabet specified at this position.
+     * @param vint description for all the positions.
+     * @param pos the start position to match in the vector.
+     * @return The int code of the word.
+     * @throw IndexOutOfBoundsException In case of wrong position.
+     */
+    
+    virtual int getWord(const std::vector<int>& vint, size_t pos = 0) const = 0;
+
+    /**
+     * @brief Get the char code for a word given the char code of the
+     * underlying positions.
+     *
+     * The char code of each position must match the corresponding alphabet specified at this position.
+     * @param vpos vector description for all the positions.
+     * @param pos the start position to match in the vector.
+     * @return The string of the word.
+     * @throw IndexOutOfBoundsException In case of wrong position.
+     */
+    
+    virtual std::string getWord(const std::vector<std::string>& vpos, size_t pos = 0) const = 0;
+
+    /**
+     * @brief Get the int code of the n-position of a word given its int description.
+     *
+     * @param word The int description of the word.
+     * @param n The position in the word (starting at 0).
+     * @return The int description of the n-position of the word.
+     */
+    
+    virtual int getNPosition(int word, size_t n) const = 0;
+    
+    /**
+     * @brief Get the int codes of each position of a word given its int description.
+     *
+     * @param word The int description of the word.
+     * @return The int description of the positions of the codon.
+     */
+
+    virtual std::vector<int> getPositions(int word) const = 0;
+
+    /**
+     * @brief Get the char code of the n-position of a word given its char description.
+     *
+     * @param word The char description of the word.
+     * @param n The position in the word (starting at 0).
+     * @return The char description of the n-position of the word.
+     */
+
+    virtual std::string getNPosition(const std::string& word, size_t n) const = 0;
+
+    /**
+     * @brief Get the char codes of each position of a word given its char description.
+     *
+     * @param word The char description of the word.
+     * @return The char description of the three positions of the word.
+     */
+
+    virtual std::vector<std::string> getPositions(const std::string& word) const = 0;
+
+    /**
+     * @brief Translate a whole sequence from letters alphabet to words alphabet.
+     *
+     * @param sequence A sequence in letters alphabet.
+     * @param pos the start postion (default 0)
+     * @return The corresponding sequence in words alphabet.
+     * @throw AlphabetMismatchException If the sequence alphabet do not match the source alphabet.
+     * @throw Exception                 Other kind of error, depending on the implementation.
+     */
+
+    virtual Sequence* translate(const Sequence &sequence, size_t pos = 0) const = 0;
+
+    /**
+     * @brief Translate a whole sequence from words alphabet to letters alphabet.
+     *
+     * @param sequence A sequence in words alphabet.
+     * @return The corresponding sequence in letters alphabet.
+     * @throw AlphabetMismatchException If the sequence alphabet do not match the target alphabet.
+     * @throw Exception                 Other kind of error, depending on the implementation.
+     */
+    
+    virtual Sequence* reverse(const Sequence& sequence) const = 0;
+
+  private:
+    
+    /**
+     * @name Inner utilitary functions
+     *
+     * @{
+     */
+
+    virtual bool containsUnresolved(const std::string& state) const = 0;
+
+    virtual bool containsGap(const std::string& state) const = 0;
+
+    /** @} */
+
+  };
+    
+
 /**
  * @brief The base class for word alphabets.
  *
@@ -63,294 +190,307 @@ namespace bpp
  * of the Alphabets. They are made from the resolved letters of the
  * Alphabets.
  */
-class WordAlphabet :
-  public AbstractAlphabet
-{
-protected:
-  std::vector<const Alphabet* > vAbsAlph_;
-
-public:
-  // Constructor and destructor.
-  /**
-   * @brief Builds a new word alphabet from a vector of Alphabets.
-   *
-   * The unit alphabets are not owned by the world alphabet, and won't
-   * be destroyed when this instance is destroyed.
-   *
-   * @param vAlpha The vector of Alphabets to be used.
-   */
-  WordAlphabet(const std::vector<const Alphabet*>& vAlpha);
-
-  /**
-   * @brief Builds a new word alphabet from a pointer to number of
-   * Alphabets.
-   *
-   * @param pAlpha The Pointer to the Alphabet to be used.
-   * @param num the length of the words.
-   */
-  WordAlphabet(const Alphabet* pAlpha, size_t num);
-
-  WordAlphabet(const WordAlphabet& bia) : AbstractAlphabet(bia), vAbsAlph_(bia.vAbsAlph_) {}
-
-  WordAlphabet& operator=(const WordAlphabet& bia)
-  {
-    AbstractAlphabet::operator=(bia);
-    vAbsAlph_=bia.vAbsAlph_;
-    return *this;
-  }
 
-  WordAlphabet* clone() const
+    
+  class WordAlphabet :
+    public virtual CoreWordAlphabet,
+    public AbstractAlphabet
   {
-    return new WordAlphabet(*this);
-  }
-
-  virtual ~WordAlphabet() {}
-
-public:
-  /**
-   * @name Methods redefined from Alphabet
-   *
-   * @{
-   */
-  /**
-   * @brief Get the complete name of a state given its string description.
-   *
-   * In case of undefined characters (i.e. N and X for nucleic alphabets),
-   * this method will return the name of the undefined word.
-   *
-   * @param state The string description of the given state.
-   * @return The name of the state.
-   * @throw BadCharException When state is not a valid char description.
-   */
-  std::string getName(const std::string& state) const throw (BadCharException);
-
-  int charToInt(const std::string& state) const throw (BadCharException)
-  {
-    if (state.size() != vAbsAlph_.size())
-      throw BadCharException(state, "WordAlphabet::charToInt", this);
-    if (containsUnresolved(state))
-      return static_cast<int>(getSize());
-    if (containsGap(state))
-      return -1;
-    else return AbstractAlphabet::charToInt(state);
-  }
+  protected:
+    std::vector<const Alphabet* > vAbsAlph_;
+
+  public:
+    // Constructor and destructor.
+    /**
+     * @brief Builds a new word alphabet from a vector of Alphabets.
+     *
+     * The unit alphabets are not owned by the world alphabet, and won't
+     * be destroyed when this instance is destroyed.
+     *
+     * @param vAlpha The vector of Alphabets to be used.
+     */
+    WordAlphabet(const std::vector<const Alphabet*>& vAlpha);
+
+    /**
+     * @brief Builds a new word alphabet from a pointer to number of
+     * Alphabets.
+     *
+     * @param pAlpha The Pointer to the Alphabet to be used.
+     * @param num the length of the words.
+     */
+    WordAlphabet(const Alphabet* pAlpha, size_t num);
+
+    WordAlphabet(const WordAlphabet& bia) : AbstractAlphabet(bia), vAbsAlph_(bia.vAbsAlph_) {}
+
+    WordAlphabet& operator=(const WordAlphabet& bia)
+    {
+      AbstractAlphabet::operator=(bia);
+      vAbsAlph_=bia.vAbsAlph_;
+      return *this;
+    }
 
-  unsigned int getSize() const
-  {
-    return getNumberOfChars() - 2;
-  }
-
-  /** @} */
-
-  /**
-   * @brief Returns True if the Alphabet of the letters in the word
-   * are the same type.
-   *
-   */
-  bool hasUniqueAlphabet() const;
-
-  /**
-   * @brief Returns the length of the word
-   *
-   */
-  unsigned int getLength() const
-  {
-    return static_cast<unsigned int>(vAbsAlph_.size());
-  }
+    WordAlphabet* clone() const
+    {
+      return new WordAlphabet(*this);
+    }
 
+    virtual ~WordAlphabet() {}
+
+  public:
+    /**
+     * @name Methods redefined from Alphabet
+     *
+     * @{
+     */
+    /**
+     * @brief Get the complete name of a state given its string description.
+     *
+     * In case of undefined characters (i.e. N and X for nucleic alphabets),
+     * this method will return the name of the undefined word.
+     *
+     * @param state The string description of the given state.
+     * @return The name of the state.
+     * @throw BadCharException When state is not a valid char description.
+     */
+    std::string getName(const std::string& state) const throw (BadCharException);
+
+    int charToInt(const std::string& state) const throw (BadCharException)
+    {
+      if (state.size() != vAbsAlph_.size())
+        throw BadCharException(state, "WordAlphabet::charToInt", this);
+      if (containsUnresolved(state))
+        return static_cast<int>(getSize());
+      if (containsGap(state))
+        return -1;
+      else return AbstractAlphabet::charToInt(state);
+    }
 
-  /**
-   * @brief Returns the number of resolved states + one for unresolved
-   *
-   */
-  unsigned int getNumberOfTypes() const
-  {
-    return getNumberOfChars() - 1;
-  }
+    unsigned int getSize() const
+    {
+      return getNumberOfChars() - 2;
+    }
 
-  std::string getAlphabetType() const;
+    /** @} */
 
-  int getUnknownCharacterCode() const
-  {
-    return static_cast<int>(getSize());
-  }
-
-  bool isUnresolved(int state) const { return state == getUnknownCharacterCode(); }
-  bool isUnresolved(const std::string& state) const { return charToInt(state) == getUnknownCharacterCode(); }
-
-  std::vector<int> getAlias(int state) const throw (BadIntException);
-  std::vector<std::string> getAlias(const std::string& state) const throw (BadCharException);
-  int getGeneric(const std::vector<int>& states) const throw (BadIntException);
-  std::string getGeneric(const std::vector<std::string>& states) const throw (BadCharException);
-
-private:
-  /**
-   * @name Inner utilitary functions
-   *
-   * @{
-   */
-  bool containsUnresolved(const std::string& state) const throw (BadCharException);
-  bool containsGap(const std::string& state) const throw (BadCharException);
-  void build_();
-  /** @} */
-
-public:
-  /**
-   * @name Word specific methods
-   *
-   * @{
-   */
-
-  /**
-   * @brief Get the pointer to the Alphabet  of the n-position.
-   *
-   * @param n The position in the word (starting at 0).
-   * @return The pointer to the Alphabet of the n-position.
-   */
-  const Alphabet* getNAlphabet(size_t n) const
-  {
-    if (n >= vAbsAlph_.size())
-      throw IndexOutOfBoundsException("WordAlphabet::getNPosition", n, 0, vAbsAlph_.size());
-
-    return vAbsAlph_[n];
-  }
-
-  /**
-   * @brief Get the int code for a word given the int code of the underlying positions.
-   *
-   * The int code of each position must match the corresponding alphabet specified at this position.
-   * @param seq description for all the positions as a Sequence object.
-   * @param pos the start position to match in the vector.
-   * @return The int code of the word.
-   * @throw IndexOutOfBoundsException In case of wrong position.
-   */
-  virtual int getWord(const Sequence& seq, size_t pos = 0) const throw (IndexOutOfBoundsException);
-
-
-  /**
-   * @brief Get the int code for a word given the int code of the underlying positions.
-   *
-   * The int code of each position must match the corresponding alphabet specified at this position.
-   * @param vint description for all the positions.
-   * @param pos the start position to match in the vector.
-   * @return The int code of the word.
-   * @throw IndexOutOfBoundsException In case of wrong position.
-   */
-  virtual int getWord(const std::vector<int>& vint, size_t pos = 0) const throw (IndexOutOfBoundsException);
-
-  /**
-   * @brief Get the char code for a word given the char code of the
-   * underlying positions.
-   *
-   * The char code of each position must match the corresponding alphabet specified at this position.
-   * @param vpos vector description for all the positions.
-   * @param pos the start position to match in the vector.
-   * @return The string of the word.
-   * @throw IndexOutOfBoundsException In case of wrong position.
-   */
-  virtual std::string getWord(const std::vector<std::string>& vpos, size_t pos = 0) const throw (IndexOutOfBoundsException, BadCharException);
-
-  /**
-   * @brief Get the int code of the n-position of a word given its int description.
-   *
-   * @param word The int description of the word.
-   * @param n The position in the word (starting at 0).
-   * @return The int description of the n-position of the word.
-   */
-  int getNPosition(int word, size_t n) const throw (BadIntException)
-  {
-    if (n >= vAbsAlph_.size())
-      throw IndexOutOfBoundsException("WordAlphabet::getNPosition", n, 0, vAbsAlph_.size());
+    /**
+     * @brief Returns True if the Alphabet of the letters in the word
+     * are the same type.
+     *
+     */
+    bool hasUniqueAlphabet() const;
 
-    std::string s = intToChar(word);
-    return vAbsAlph_[n]->charToInt(s.substr(n, 1));
-  }
+    /**
+     * @brief Returns the length of the word
+     *
+     */
+    unsigned int getLength() const
+    {
+      return static_cast<unsigned int>(vAbsAlph_.size());
+    }
 
-  /**
-   * @brief Get the int codes of each position of a word given its int description.
-   *
-   * @param word The int description of the word.
-   * @return The int description of the positions of the codon.
-   */
 
-  std::vector<int> getPositions(int word) const throw (BadIntException)
-  {
-    std::string s = intToChar(word);
-    std::vector<int> positions;
-    for (size_t i = 0; i < s.size(); i++)
+    /**
+     * @brief Returns the number of resolved states + one for unresolved
+     *
+     */
+    unsigned int getNumberOfTypes() const
     {
-      positions.push_back(vAbsAlph_[i]->charToInt(s.substr(i, 1)));
+      return getNumberOfChars() - 1;
     }
 
-    return positions;
-  }
-  /**
-   * @brief Get the char code of the n-position of a word given its char description.
-   *
-   * @param word The char description of the word.
-   * @param n The position in the word (starting at 0).
-   * @return The char description of the n-position of the word.
-   */
-  std::string getNPosition(const std::string& word, size_t n) const throw (BadCharException)
-  {
-    if (n > vAbsAlph_.size())
-      throw BadCharException("", "WordAlphabet::getNPosition", this);
-    // Test:
-    charToInt(word);
+    std::string getAlphabetType() const;
 
-    return "" + word.substr(n, 1);
-  }
+    int getUnknownCharacterCode() const
+    {
+      return static_cast<int>(getSize());
+    }
 
+    bool isUnresolved(int state) const { return state == getUnknownCharacterCode(); }
+    bool isUnresolved(const std::string& state) const { return charToInt(state) == getUnknownCharacterCode(); }
+
+    std::vector<int> getAlias(int state) const throw (BadIntException);
+
+    std::vector<std::string> getAlias(const std::string& state) const throw (BadCharException);
+    
+    int getGeneric(const std::vector<int>& states) const throw (BadIntException);
+
+    std::string getGeneric(const std::vector<std::string>& states) const throw (BadCharException);
+
+  private:
+    /**
+     * @name Inner utilitary functions
+     *
+     * @{
+     */
+    bool containsUnresolved(const std::string& state) const;
+    bool containsGap(const std::string& state) const;
+    void build_();
+    /** @} */
+
+  public:
+    /**
+     * @name Word specific methods
+     *
+     * @{
+     */
+
+    /**
+     * @brief Get the pointer to the Alphabet  of the n-position.
+     *
+     * @param n The position in the word (starting at 0).
+     * @return The pointer to the Alphabet of the n-position.
+     */
+    const Alphabet* getNAlphabet(size_t n) const
+    {
+      if (n >= vAbsAlph_.size())
+        throw IndexOutOfBoundsException("WordAlphabet::getNPosition", n, 0, vAbsAlph_.size());
 
-  /**
-   * @brief Get the char codes of each position of a word given its char description.
-   *
-   * @param word The char description of the word.
-   * @return The char description of the three positions of the word.
-   */
+      return vAbsAlph_[n];
+    }
 
-  std::vector<std::string> getPositions(const std::string& word) const throw (BadCharException)
-  {
-    charToInt(word);
-    std::vector<std::string> positions;
-    for (size_t i = 0; i < word.size(); i++)
+    /**
+     * @brief Get the int code for a word given the int code of the underlying positions.
+     *
+     * The int code of each position must match the corresponding alphabet specified at this position.
+     * @param seq description for all the positions as a Sequence object.
+     * @param pos the start position to match in the vector.
+     * @return The int code of the word.
+     * @throw IndexOutOfBoundsException In case of wrong position.
+     */
+    
+    virtual int getWord(const Sequence& seq, size_t pos = 0) const;
+
+
+    /**
+     * @brief Get the int code for a word given the int code of the underlying positions.
+     *
+     * The int code of each position must match the corresponding alphabet specified at this position.
+     * @param vint description for all the positions.
+     * @param pos the start position to match in the vector.
+     * @return The int code of the word.
+     * @throw IndexOutOfBoundsException In case of wrong position.
+     */
+    
+    virtual int getWord(const std::vector<int>& vint, size_t pos = 0) const;
+
+    /**
+     * @brief Get the char code for a word given the char code of the
+     * underlying positions.
+     *
+     * The char code of each position must match the corresponding alphabet specified at this position.
+     * @param vpos vector description for all the positions.
+     * @param pos the start position to match in the vector.
+     * @return The string of the word.
+     * @throw IndexOutOfBoundsException In case of wrong position.
+     */
+
+    virtual std::string getWord(const std::vector<std::string>& vpos, size_t pos = 0) const;
+
+    /**
+     * @brief Get the int code of the n-position of a word given its int description.
+     *
+     * @param word The int description of the word.
+     * @param n The position in the word (starting at 0).
+     * @return The int description of the n-position of the word.
+     */
+
+    int getNPosition(int word, size_t n) const
+    {
+      if (n >= vAbsAlph_.size())
+        throw IndexOutOfBoundsException("WordAlphabet::getNPosition", n, 0, vAbsAlph_.size());
+
+      std::string s = intToChar(word);
+      return vAbsAlph_[n]->charToInt(s.substr(n, 1));
+    }
+
+    /**
+     * @brief Get the int codes of each position of a word given its int description.
+     *
+     * @param word The int description of the word.
+     * @return The int description of the positions of the codon.
+     */
+
+    std::vector<int> getPositions(int word) const
+    {
+      std::string s = intToChar(word);
+      std::vector<int> positions;
+      for (size_t i = 0; i < s.size(); i++)
+      {
+        positions.push_back(vAbsAlph_[i]->charToInt(s.substr(i, 1)));
+      }
+
+      return positions;
+    }
+    /**
+     * @brief Get the char code of the n-position of a word given its char description.
+     *
+     * @param word The char description of the word.
+     * @param n The position in the word (starting at 0).
+     * @return The char description of the n-position of the word.
+     */
+    
+    std::string getNPosition(const std::string& word, size_t n) const
+    {
+      if (n > vAbsAlph_.size())
+        throw BadCharException("", "WordAlphabet::getNPosition", this);
+      // Test:
+      charToInt(word);
+
+      return "" + word.substr(n, 1);
+    }
+
+
+    /**
+     * @brief Get the char codes of each position of a word given its char description.
+     *
+     * @param word The char description of the word.
+     * @return The char description of the three positions of the word.
+     */
+
+    std::vector<std::string> getPositions(const std::string& word) const 
     {
-      positions.push_back(word.substr(i, 1));
+      charToInt(word);
+      std::vector<std::string> positions;
+      for (size_t i = 0; i < word.size(); i++)
+      {
+        positions.push_back(word.substr(i, 1));
+      }
+
+      return positions;
     }
 
-    return positions;
-  }
-
-  /**
-   * @brief Translate a whole sequence from letters alphabet to words alphabet.
-   *
-   * @param sequence A sequence in letters alphabet.
-   * @param pos the start postion (default 0)
-   * @return The corresponding sequence in words alphabet.
-   * @throw AlphabetMismatchException If the sequence alphabet do not match the source alphabet.
-   * @throw Exception                 Other kind of error, depending on the implementation.
-   */
-  Sequence* translate(const Sequence &sequence, size_t = 0) const throw (AlphabetMismatchException, Exception);
-
-  /**
-   * @brief Translate a whole sequence from words alphabet to letters alphabet.
-   *
-   * @param sequence A sequence in words alphabet.
-   * @return The corresponding sequence in letters alphabet.
-   * @throw AlphabetMismatchException If the sequence alphabet do not match the target alphabet.
-   * @throw Exception                 Other kind of error, depending on the implementation.
-   */
-  Sequence* reverse(const Sequence& sequence) const throw (AlphabetMismatchException, Exception);
-
-  /** @} */
-
-  /**
-   * @name Overloaded AbstractAlphabet methods.
-   * @{
-   */
-  unsigned int getStateCodingSize() const { return static_cast<unsigned int>(vAbsAlph_.size()); }
-  /** @} */
-};
+    /**
+     * @brief Translate a whole sequence from letters alphabet to words alphabet.
+     *
+     * @param sequence A sequence in letters alphabet.
+     * @param pos the start postion (default 0)
+     * @return The corresponding sequence in words alphabet.
+     * @throw AlphabetMismatchException If the sequence alphabet do not match the source alphabet.
+     * @throw Exception                 Other kind of error, depending on the implementation.
+     */
+    
+    Sequence* translate(const Sequence &sequence, size_t = 0) const;
+
+    /**
+     * @brief Translate a whole sequence from words alphabet to letters alphabet.
+     *
+     * @param sequence A sequence in words alphabet.
+     * @return The corresponding sequence in letters alphabet.
+     * @throw AlphabetMismatchException If the sequence alphabet do not match the target alphabet.
+     * @throw Exception                 Other kind of error, depending on the implementation.
+     */
+    
+    Sequence* reverse(const Sequence& sequence) const;
+
+    /** @} */
+
+    /**
+     * @name Overloaded AbstractAlphabet methods.
+     * @{
+     */
+    unsigned int getStateCodingSize() const { return static_cast<unsigned int>(vAbsAlph_.size()); }
+    /** @} */
+  };
 } // end of namespace bpp.
 
 #endif  // _WORDALPHABET_H_
diff --git a/src/Bpp/Seq/CodonSiteTools.cpp b/src/Bpp/Seq/CodonSiteTools.cpp
index 9ec992a..decb720 100644
--- a/src/Bpp/Seq/CodonSiteTools.cpp
+++ b/src/Bpp/Seq/CodonSiteTools.cpp
@@ -232,6 +232,7 @@ size_t CodonSiteTools::numberOfDifferences(int i, int j, const CodonAlphabet& ca
 double CodonSiteTools::numberOfSynonymousDifferences(int i, int j, const GeneticCode& gCode, bool minchange)
 {
   const CodonAlphabet* ca = dynamic_cast<const CodonAlphabet*>(gCode.getSourceAlphabet());
+  
   vector<int> ci = ca->getPositions(i);
   vector<int> cj = ca->getPositions(j);
 
@@ -250,10 +251,12 @@ double CodonSiteTools::numberOfSynonymousDifferences(int i, int j, const Genetic
       return 2;
     vector<double> path(2, 0); // Vector of number of synonymous changes per path (2 here)
     vector<double> weight(2, 1); // Weight to exclude path through stop codon
+
     if (ci[0] == cj[0])
     {
       int trans1 = ca->getCodon(ci[0], cj[1], ci[2]); // transitory codon between NcNiNi et NcNjNj: NcNjNi, Nc = identical site
       int trans2 = ca->getCodon(ci[0], ci[1], cj[2]); // transitory codon between NcNiNi et NcNjNj: NcNiNj, Nc = identical site
+      
       if (!gCode.isStop(trans1))
       {
         if (gCode.areSynonymous(i, trans1))
@@ -462,14 +465,17 @@ double CodonSiteTools::piSynonymous(const Site& site, const GeneticCode& gCode,
   // General polymorphism checking
   if (SiteTools::isConstant(site))
     return 0;
+  
   // Computation
   map<int, double> freq;
+
   SiteTools::getFrequencies(site, freq);
   double pi = 0;
   for (map<int, double>::iterator it1 = freq.begin(); it1 != freq.end(); it1++)
   {
     for (map<int, double>::iterator it2 = freq.begin(); it2 != freq.end(); it2++)
     {
+      
       pi += (it1->second) * (it2->second) * (numberOfSynonymousDifferences(it1->first, it2->first, gCode, minchange));
     }
   }
@@ -509,6 +515,7 @@ double CodonSiteTools::piNonSynonymous(const Site& site, const GeneticCode& gCod
       pi += (it1->second) * (it2->second) * (nbtot - nbsyn);
     }
   }
+  
   size_t n = site.size();
   return pi * static_cast<double>(n / (n - 1));
 }
@@ -580,14 +587,14 @@ double CodonSiteTools::meanNumberOfSynonymousPositions(const Site& site, const G
 
 /******************************************************************************/
 
-size_t CodonSiteTools::numberOfSubsitutions(const Site& site, const GeneticCode& gCode, double freqmin)
+size_t CodonSiteTools::numberOfSubstitutions(const Site& site, const GeneticCode& gCode, double freqmin)
 {
   // Alphabet checking
   if (!AlphabetTools::isCodonAlphabet(site.getAlphabet()))
-    throw AlphabetException("CodonSiteTools::numberOfSubsitutions: alphabet is not CodonAlphabet", site.getAlphabet());
+    throw AlphabetException("CodonSiteTools::numberOfSubstitutions: alphabet is not CodonAlphabet", site.getAlphabet());
   // Empty site checking
   if (site.size() == 0)
-    throw EmptySiteException("CodonSiteTools::numberOfSubsitutions: Incorrect specified site", &site);
+    throw EmptySiteException("CodonSiteTools::numberOfSubstitutions: Incorrect specified site", &site);
 
   if (SiteTools::isConstant(site))
     return 0;
diff --git a/src/Bpp/Seq/CodonSiteTools.h b/src/Bpp/Seq/CodonSiteTools.h
index 9f0b85c..f4e92df 100644
--- a/src/Bpp/Seq/CodonSiteTools.h
+++ b/src/Bpp/Seq/CodonSiteTools.h
@@ -226,7 +226,7 @@ class CodonSiteTools:
      * @param gCode a GeneticCode
      * @param freqmin a double          To exclude snp in frequency strictly lower than freqmin (by default freqmin = 0)
      */
-    static size_t numberOfSubsitutions(const Site& site, const GeneticCode& gCode, double freqmin = 0.);
+    static size_t numberOfSubstitutions(const Site& site, const GeneticCode& gCode, double freqmin = 0.);
 
     /**
      * @brief Return the number of Non Synonymous subsitutions per codon site.
diff --git a/src/Bpp/Seq/Container/VectorProbabilisticSiteContainer.cpp b/src/Bpp/Seq/Container/VectorProbabilisticSiteContainer.cpp
deleted file mode 100644
index b40a379..0000000
--- a/src/Bpp/Seq/Container/VectorProbabilisticSiteContainer.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-//
-// File: VectorProbabilisticSiteContainer.cpp
-// Created by: Murray Patterson
-// Created on: Mon Oct 19 2015
-//
-
-/*
-   Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
-
-   This software is a computer program whose purpose is to provide classes
-   for sequences analysis.
-
-   This software is governed by the CeCILL  license under French law and
-   abiding by the rules of distribution of free software.  You can  use,
-   modify and/ or redistribute the software under the terms of the CeCILL
-   license as circulated by CEA, CNRS and INRIA at the following URL
-   "http://www.cecill.info".
-
-   As a counterpart to the access to the source code and  rights to copy,
-   modify and redistribute granted by the license, users are provided only
-   with a limited warranty  and the software's author,  the holder of the
-   economic rights,  and the successive licensors  have only  limited
-   liability.
-
-   In this respect, the user's attention is drawn to the risks associated
-   with loading,  using,  modifying and/or developing or reproducing the
-   software by the user in light of its specific status of free software,
-   that may mean  that it is complicated to manipulate,  and  that  also
-   therefore means  that it is reserved for developers  and  experienced
-   professionals having in-depth computer knowledge. Users are therefore
-   encouraged to load and test the software's suitability as regards their
-   requirements in conditions enabling the security of their systems and/or
-   data to be ensured and,  more generally, to use and operate it in the
-   same conditions as regards security.
-
-   The fact that you are presently reading this means that you have had
-   knowledge of the CeCILL license and that you accept its terms.
-*/
-
-#include "VectorProbabilisticSiteContainer.h"
-
-#include <Bpp/Text/TextTools.h>
-#include <Bpp/Numeric/DataTable.h>
-
-using namespace bpp;
-
-/********************************************************************************/
-
-VectorProbabilisticSiteContainer::VectorProbabilisticSiteContainer(const Alphabet * alpha) :
-  VectorSiteContainer(alpha),
-  p_sites_(0),
-  p_sequences_(0)
-{}
-
-/********************************************************************************/
-
-const ProbabilisticSite & VectorProbabilisticSiteContainer::getProbabilisticSite(std::size_t i) const throw (IndexOutOfBoundsException)
-{
-  if(i >= getNumberOfProbabilisticSites())
-    throw IndexOutOfBoundsException("VectorProbabilisticSiteContainer::getProbabilisticSite.", i, 0, getNumberOfProbabilisticSites() - 1);
-
-  return *p_sites_[i];
-}
-
-/********************************************************************************/
-
-void VectorProbabilisticSiteContainer::addSite(const ProbabilisticSite & site, bool checkPosition) throw (Exception)
-{
-  // check size :
-  if(site.size() != getNumberOfProbabilisticSequences())
-    throw Exception("VectorProbabilisticSiteContainer::addSite. Site does not have the appropriate length: " + TextTools::toString(site.size()) + ", should be " + TextTools::toString(getNumberOfProbabilisticSequences()) + ".");
-
-  // new site's alphabet and site container's alphabet must match :
-  if(site.getAlphabet()->getAlphabetType() != getAlphabet()->getAlphabetType())
-    throw AlphabetMismatchException("VectorProbabilisticSiteContainer::addSite.", getAlphabet(), site.getAlphabet());
-
-  // check position :
-  if(checkPosition) {
-
-    int position = site.getPosition();
-    // for all positions in vector : throw exception if position already exists
-    for(std::size_t i = 0; i < p_sites_.size(); ++i)
-      if(p_sites_[i]->getPosition() == position)
-	throw Exception("VectorSiteContainer::addSite. Site position: " + TextTools::toString(position) + ", already exists in container.");
-  }
-
-  p_sites_.push_back(dynamic_cast<ProbabilisticSite *>(site.clone()));
-}
-
-/********************************************************************************/
-
-const ProbabilisticSequence & VectorProbabilisticSiteContainer::getProbabilisticSequence(std::size_t i) const throw (IndexOutOfBoundsException)
-{
-
-  if(i >= getNumberOfProbabilisticSequences())
-    throw IndexOutOfBoundsException("VectorProbabilisticSiteContainer::getProbabilisticSequence.", i, 0, getNumberOfProbabilisticSequences() - 1);
-
-  // main loop : for all sites
-  std::size_t n = getNumberOfProbabilisticSites();
-  DataTable sequence(getAlphabet()->getResolvedChars());
-  for(std::size_t j = 0; j < n; ++j)
-    sequence.addRow(p_sites_[j]->getContent().getRow(i));
-
-  if(p_sequences_[i])
-    delete p_sequences_[i];
-
-  p_sequences_[i] = new BasicProbabilisticSequence(names_[i], sequence, *comments_[i], getAlphabet());
-
-  return *p_sequences_[i];
-}
-
-/********************************************************************************/
-
-void VectorProbabilisticSiteContainer::addSequence(const ProbabilisticSequence & sequence, bool checkName) throw (Exception)
-{
-
-  // if the container has no sequence, we set the size to the size of this sequence :
-  if(getNumberOfProbabilisticSequences() == 0)
-    pRealloc(sequence.size());
-
-  // new sequence's alphabet and site container's alphabet must match :
-  if(sequence.getAlphabet()->getAlphabetType() != getAlphabet()->getAlphabetType())
-    throw AlphabetMismatchException("VectorProbabilisticSiteContainer::addSequence.", getAlphabet(), sequence.getAlphabet());
-
-  if(sequence.size() != p_sites_.size())
-    throw Exception("VectorProbabilisticSiteContainer::addSequence. Sequence does not have the appropriate length: " + TextTools::toString(sequence.size()) + ", should be " + TextTools::toString(p_sites_.size()) + ".");
-
-  // check name :
-  if(checkName)
-    for(std::size_t i = 0; i < names_.size(); ++i)
-      if(sequence.getName() == names_[i])
-	throw Exception("VectorProbabilisticSiteContainer::addSequence. Name: " + sequence.getName() + ", already exists in the container.");
-
-  // append name :
-  names_.push_back(sequence.getName());
-
-  // append elements at each site :
-  for(size_t i = 0; i < p_sites_.size(); ++i)
-    p_sites_[i]->addElement(sequence.getContent().getRow(i));
-
-  // append comments :
-  comments_.push_back(new Comments(sequence.getComments()));
-
-  // sequence pointers :
-  p_sequences_.push_back(0);
-}
-
-/********************************************************************************/
-
-void VectorProbabilisticSiteContainer::pClear()
-{
-  clear(); // call VectorSiteContainer clear
-
-  // now clear all probabilistic sites / sequences
-  for(std::size_t i = 0; i < p_sites_.size(); ++i)
-    delete p_sites_[i];
-
-  for(std::size_t i = 0; i < p_sequences_.size(); ++i)
-    delete p_sequences_[i];
-
-  // and delete the corresponding pointers
-  p_sites_.clear();
-  p_sequences_.clear();
-}  
-
-/********************************************************************************/
-
-void VectorProbabilisticSiteContainer::reindexpSites()
-{
-  int pos = 1; // start at position 1
-  std::vector<ProbabilisticSite *>::iterator i = p_sites_.begin();
-  for(; i != p_sites_.end(); ++i)
-    (*i)->setPosition(++pos);
-}
-
-/********************************************************************************/
-
-void VectorProbabilisticSiteContainer::pRealloc(std::size_t n)
-{
-  pClear();
-  p_sites_.resize(n);
-
-  for(std::size_t i = 0; i < n; ++i)
-    p_sites_[i] = new BasicProbabilisticSite(getAlphabet());
-
-  reindexpSites();
-}
diff --git a/src/Bpp/Seq/Container/VectorProbabilisticSiteContainer.h b/src/Bpp/Seq/Container/VectorProbabilisticSiteContainer.h
deleted file mode 100644
index 5f93474..0000000
--- a/src/Bpp/Seq/Container/VectorProbabilisticSiteContainer.h
+++ /dev/null
@@ -1,123 +0,0 @@
-//
-// File: VectorProbabilisticSiteContainer.h
-// Created by: Murray Patterson
-// Created on: Mon Oct 19 2015
-//
-
-/*
-   Copyright or © or Copr. CNRS, (November 17, 2004)
-
-   This software is a computer program whose purpose is to provide classes
-   for sequences analysis.
-
-   This software is governed by the CeCILL  license under French law and
-   abiding by the rules of distribution of free software.  You can  use,
-   modify and/ or redistribute the software under the terms of the CeCILL
-   license as circulated by CEA, CNRS and INRIA at the following URL
-   "http://www.cecill.info".
-
-   As a counterpart to the access to the source code and  rights to copy,
-   modify and redistribute granted by the license, users are provided only
-   with a limited warranty  and the software's author,  the holder of the
-   economic rights,  and the successive licensors  have only  limited
-   liability.
-
-   In this respect, the user's attention is drawn to the risks associated
-   with loading,  using,  modifying and/or developing or reproducing the
-   software by the user in light of its specific status of free software,
-   that may mean  that it is complicated to manipulate,  and  that  also
-   therefore means  that it is reserved for developers  and  experienced
-   professionals having in-depth computer knowledge. Users are therefore
-   encouraged to load and test the software's suitability as regards their
-   requirements in conditions enabling the security of their systems and/or
-   data to be ensured and,  more generally, to use and operate it in the
-   same conditions as regards security.
-
-   The fact that you are presently reading this means that you have had
-   knowledge of the CeCILL license and that you accept its terms.
-*/
-
-#ifndef _VECTORPROBABILISTICSITECONTAINER_H_
-#define _VECTORPROBABILISTICSITECONTAINER_H_
-
-#include "VectorSiteContainer.h"
-
-#include "../ProbabilisticSite.h"
-#include "../ProbabilisticSequence.h"
-
-// From the STL :
-#include <vector>
-
-namespace bpp
-{
-
-/**
- * @brief The VectorProbabilisticSiteContainer class.
- *
- * ProbabilisticSites are stored in a std::vector of pointers.
- * ProbabilisticSite access is hence in \f$O(1)\f$, and sequence
- * access in \f$O(l)\f$, where \f$l\f$ is the number of sites in the
- * container.
- *
- * This is a modified copy of VectorSiteContainer with the minimum
- * changes necessary for it to work with bppML and bppAncestor
- *
- * @see ProbabilisticSequence, ProbabilisticSite, VectorSiteContainer
- */
-class VectorProbabilisticSiteContainer :
-  public VectorSiteContainer
-{
-
- protected :
-
-  std::vector<ProbabilisticSite *> p_sites_;
-  mutable std::vector<ProbabilisticSequence *> p_sequences_;
-
- public :
-
-  /**
-   * @brief Build a new emtpy container.
-   *
-   * @param alpha The alphabet for this container.
-   */
-  VectorProbabilisticSiteContainer(const Alphabet * alpha);
-
-  /**
-   * @name The Clonable interface.
-   *
-   * @{
-   */
-  VectorSiteContainer* clone() const { return new VectorSiteContainer(*this); }
-
-  /**
-   * @}
-   */
-
-  // class destructor
-  virtual ~VectorProbabilisticSiteContainer() { pClear(); }
-
- public :
-
-  const ProbabilisticSite & getProbabilisticSite(std::size_t i) const throw (IndexOutOfBoundsException);
-
-  void addSite(const ProbabilisticSite & site, bool checkPosition = true) throw (Exception);
-
-  const ProbabilisticSequence & getProbabilisticSequence(std::size_t i) const throw (IndexOutOfBoundsException);
-
-  void addSequence(const ProbabilisticSequence & sequence, bool checkName = true) throw (Exception);
-
-  std::size_t getNumberOfProbabilisticSites() const { return p_sites_.size(); }
-  std::size_t getNumberOfProbabilisticSequences() const { return p_sequences_.size(); }
-
-  void pClear();
-  void reindexpSites();
-
- protected :
-
-  // create n void probabilistic sites :
-  void pRealloc(std::size_t n);
-};
-
-} // end of namespace bpp
-
-#endif  // _VECTORPROBABILISTICSITECONTAINER_H_
diff --git a/src/Bpp/Seq/SequenceTools.cpp b/src/Bpp/Seq/SequenceTools.cpp
index c483f72..6156f8a 100644
--- a/src/Bpp/Seq/SequenceTools.cpp
+++ b/src/Bpp/Seq/SequenceTools.cpp
@@ -109,11 +109,11 @@ Sequence& SequenceTools::complement(Sequence& seq) throw (AlphabetException)
 {
   // Alphabet type checking
   NucleicAcidsReplication* NAR;
-  if (seq.getAlphabet()->getAlphabetType() == "DNA alphabet")
+  if (AlphabetTools::isDNAAlphabet(seq.getAlphabet()))
   {
     NAR = &DNARep_;
   }
-  else if (seq.getAlphabet()->getAlphabetType() == "RNA alphabet")
+  else if (AlphabetTools::isRNAAlphabet(seq.getAlphabet()))
   {
     NAR = &RNARep_;
   }
@@ -134,11 +134,11 @@ Sequence* SequenceTools::getComplement(const Sequence& sequence) throw (Alphabet
 {
   // Alphabet type checking
   NucleicAcidsReplication* NAR;
-  if (sequence.getAlphabet()->getAlphabetType() == "DNA alphabet")
+  if (AlphabetTools::isDNAAlphabet(sequence.getAlphabet()))
   {
     NAR = &DNARep_;
   }
-  else if (sequence.getAlphabet()->getAlphabetType() == "RNA alphabet")
+  else if (AlphabetTools::isRNAAlphabet(sequence.getAlphabet()))
   {
     NAR = &RNARep_;
   }
@@ -155,7 +155,7 @@ Sequence* SequenceTools::getComplement(const Sequence& sequence) throw (Alphabet
 Sequence* SequenceTools::transcript(const Sequence& sequence) throw (AlphabetException)
 {
   // Alphabet type checking
-  if (sequence.getAlphabet()->getAlphabetType() != "DNA alphabet")
+  if (AlphabetTools::isDNAAlphabet(sequence.getAlphabet()))
   {
     throw AlphabetException ("SequenceTools::transcript : Sequence must be DNA", sequence.getAlphabet());
   }
@@ -168,7 +168,7 @@ Sequence* SequenceTools::transcript(const Sequence& sequence) throw (AlphabetExc
 Sequence* SequenceTools::reverseTranscript(const Sequence& sequence) throw (AlphabetException)
 {
   // Alphabet type checking
-  if (sequence.getAlphabet()->getAlphabetType() != "RNA alphabet")
+  if (AlphabetTools::isRNAAlphabet(sequence.getAlphabet()))
   {
     throw AlphabetException ("SequenceTools::reverseTranscript : Sequence must be RNA", sequence.getAlphabet());
   }
@@ -208,17 +208,17 @@ Sequence& SequenceTools::invertComplement(Sequence& seq)
 {
   // Alphabet type checking
   NucleicAcidsReplication* NAR;
-  if (seq.getAlphabet()->getAlphabetType() == "DNA alphabet")
+  if (AlphabetTools::isDNAAlphabet(seq.getAlphabet()))
   {
     NAR = &DNARep_;
   }
-  else if (seq.getAlphabet()->getAlphabetType() == "RNA alphabet")
+  else if (AlphabetTools::isRNAAlphabet(seq.getAlphabet()))
   {
     NAR = &RNARep_;
   }
   else
   {
-    throw AlphabetException("SequenceTools::complement: Sequence must be nucleic.", seq.getAlphabet());
+    throw AlphabetException("SequenceTools::invertComplement: Sequence must be nucleic.", seq.getAlphabet());
   }
   // for (size_t i = 0 ; i < seq.size() ; i++) {
   //  seq.setElement(i, NAR->translate(seq.getValue(i)));
@@ -577,7 +577,7 @@ Sequence* SequenceTools::subtractHaplotype(const Sequence& s, const Sequence& h,
 Sequence* SequenceTools::RNYslice(const Sequence& seq, int ph) throw (AlphabetException)
 {
   // Alphabet type checking
-  if (seq.getAlphabet()->getAlphabetType() != "DNA alphabet")
+  if (AlphabetTools::isDNAAlphabet(seq.getAlphabet()))
   {
     throw AlphabetException ("SequenceTools::transcript : Sequence must be DNA", seq.getAlphabet());
   }
@@ -619,7 +619,7 @@ Sequence* SequenceTools::RNYslice(const Sequence& seq, int ph) throw (AlphabetEx
 Sequence* SequenceTools::RNYslice(const Sequence& seq) throw (AlphabetException)
 {
   // Alphabet type checking
-  if (seq.getAlphabet()->getAlphabetType() != "DNA alphabet")
+  if (AlphabetTools::isDNAAlphabet(seq.getAlphabet()))
   {
     throw AlphabetException ("SequenceTools::transcript : Sequence must be DNA", seq.getAlphabet());
   }
diff --git a/src/Bpp/Seq/StringSequenceTools.cpp b/src/Bpp/Seq/StringSequenceTools.cpp
index fb29e48..6fab544 100644
--- a/src/Bpp/Seq/StringSequenceTools.cpp
+++ b/src/Bpp/Seq/StringSequenceTools.cpp
@@ -272,7 +272,13 @@ double StringSequenceTools::getGCcontent(const string& sequence, size_t pos, siz
 vector<int> StringSequenceTools::codeSequence(const string& sequence, const Alphabet* alphabet)
 throw (BadCharException)
 {
-  unsigned int size = AlphabetTools::getAlphabetCodingSize(alphabet); // Warning, an exception may be casted here!
+  unsigned int size = AlphabetTools::getAlphabetCodingSize(alphabet); // Warning,
+                                                                      // an
+                                                                      // exception
+                                                                      // may
+                                                                      // be
+                                                                      // casted
+                                                                      // here!
   vector<int> code(static_cast<size_t>(floor(static_cast<double>(sequence.size()) / static_cast<double>(size))));
   size_t pos = 0;
   size_t count = 0;
diff --git a/src/Bpp/Seq/SymbolListTools.cpp b/src/Bpp/Seq/SymbolListTools.cpp
index 8e67127..561d1a1 100644
--- a/src/Bpp/Seq/SymbolListTools.cpp
+++ b/src/Bpp/Seq/SymbolListTools.cpp
@@ -91,7 +91,7 @@ void SymbolListTools::getCounts(const SymbolList& list1, const SymbolList& list2
 
 void SymbolListTools::getFrequencies(const SymbolList& list, map<int, double>& frequencies, bool resolveUnknowns)
 {
-	double n = (double)list.size();
+  double n = (double)list.size();
   map<int, double> counts;
   getCounts(list, counts, resolveUnknowns);
   for (map<int, double>::iterator i = counts.begin(); i != counts.end(); i++)
@@ -102,7 +102,7 @@ void SymbolListTools::getFrequencies(const SymbolList& list, map<int, double>& f
 
 void SymbolListTools::getFrequencies(const SymbolList& list1, const SymbolList& list2, map<int, map<int, double> >& frequencies, bool resolveUnknowns) throw (DimensionException)
 {
-	double n2 = (double)list1.size() * (double)list1.size();
+  double n2 = (double)list1.size() * (double)list1.size();
   map<int, map<int, double> > counts;
   getCounts(list1, list2, counts, resolveUnknowns);
   for (map<int, map<int, double> >::iterator i = counts.begin(); i != counts.end(); i++)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 2e19f7d..ab9b0aa 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -16,9 +16,11 @@ foreach (test_cpp_file ${test_cpp_files})
   get_filename_component (test_name ${test_cpp_file} NAME_WE)
   add_executable (${test_name} ${test_cpp_file})
   target_link_libraries (${test_name} ${PROJECT_NAME}-shared)
+  set_target_properties (${test_name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
   add_test (
     NAME ${test_name}
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
     COMMAND ${test_name}
     )
+  set_tests_properties (${test_name} PROPERTIES TIMEOUT 60000)
 endforeach (test_cpp_file)
diff --git a/test/test_alphabets.cpp b/test/test_alphabets.cpp
index bf5b346..8773c5d 100644
--- a/test/test_alphabets.cpp
+++ b/test/test_alphabets.cpp
@@ -42,6 +42,7 @@ knowledge of the CeCILL license and that you accept its terms.
 #include <Bpp/Seq/Alphabet/ProteicAlphabet.h>
 #include <Bpp/Seq/Alphabet/DefaultAlphabet.h>
 #include <Bpp/Seq/Alphabet/CodonAlphabet.h>
+#include <Bpp/Seq/Alphabet/AlphabetTools.h>
 #include <iostream>
 
 using namespace bpp;
@@ -55,6 +56,14 @@ int main() {
   Alphabet* def = new DefaultAlphabet;
   Alphabet* cdn = new CodonAlphabet(rna);
 
+  //Testing functions:
+  if (!AlphabetTools::isDNAAlphabet(dna)) return 1;
+  if (!AlphabetTools::isRNAAlphabet(rna)) return 1;
+  if (!AlphabetTools::isNucleicAlphabet(dna)) return 1;
+  if (!AlphabetTools::isNucleicAlphabet(rna)) return 1;
+  if (!AlphabetTools::isProteicAlphabet(pro)) return 1;
+  if (!AlphabetTools::isCodonAlphabet(cdn)) return 1;
+
   delete dna;
   delete rna;
   delete pro;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libbpp-seq.git



More information about the debian-med-commit mailing list